Skip to content

Commit

Permalink
Add test for Any containing a timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
thesamet committed Nov 23, 2023
1 parent 417570b commit ea61bde
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/test/scala/scalapb/json4s/AnyFormatSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,9 @@ class AnyFormatSpec extends AnyFlatSpec with Matchers with JavaAssertions {

val input = ScalaJsonParser.fromJson[AnyContainer](optionalAnyJson)

input.getOptionalAny.unpack[com.google.protobuf.Timestamp] must be(
com.google.protobuf.Timestamp()
input.getOptionalAny
.unpack[com.google.protobuf.timestamp.Timestamp] must be(
com.google.protobuf.timestamp.Timestamp()
)

ScalaJsonPrinter.toJson(input) must be(optionalAnyJson)
Expand Down

0 comments on commit ea61bde

Please sign in to comment.