diff options
author | Marvin Bertin <marvin.bertin@gmail.com> | 2017-10-10 17:05:32 -0700 |
---|---|---|
committer | Marvin Bertin <marvin.bertin@gmail.com> | 2017-10-10 17:05:32 -0700 |
commit | f55212361d6126a05075a1f00f3915484b4f334e (patch) | |
tree | a376ae86b707699a971ddbd6abe6bd2d29ca124d /src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/DocumentFormatSuite.scala | |
parent | 0653b90dddc294fddb0e81059aef00b202113d78 (diff) | |
download | rest-query-f55212361d6126a05075a1f00f3915484b4f334e.tar.gz rest-query-f55212361d6126a05075a1f00f3915484b4f334e.tar.bz2 rest-query-f55212361d6126a05075a1f00f3915484b4f334e.zip |
add json format tests for Slot and Eligibility arms
Diffstat (limited to 'src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/DocumentFormatSuite.scala')
-rw-r--r-- | src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/DocumentFormatSuite.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/DocumentFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/DocumentFormatSuite.scala index 9394735..481e92f 100644 --- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/DocumentFormatSuite.scala +++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/DocumentFormatSuite.scala @@ -31,7 +31,7 @@ class DocumentFormatSuite extends FlatSpec with Matchers { ) val writtenJson = documentFormat.write(orig) - writtenJson should be ( + writtenJson should be( """{"id":1,"recordId":101,"physician":"physician","typeId":10,"provider":"provider 21","providerTypeId":21, "requiredType":"OPN","startDate":null,"endDate":null,"status":"New","assignee":null,"previousStatus":null, "previousAssignee":null,"lastActiveUser":null,"lastUpdate":"2017-08-10T18:00Z","meta":null}""".parseJson) @@ -58,15 +58,15 @@ class DocumentFormatSuite extends FlatSpec with Matchers { } "Json format for Document.Meta" should "read and write correct JSON" in { - val meta = Document.Meta(predicted = None, startPage = 1.0, endPage = 2.0) + val meta = Document.Meta(predicted = None, startPage = 1.0, endPage = 2.0) val writtenJson = documentMetaFormat.write(meta) - writtenJson should be ("""{"startPage":1.0,"endPage":2.0}""".parseJson) + writtenJson should be("""{"startPage":1.0,"endPage":2.0}""".parseJson) - val metaJsonWithoutPredicted = """{"startPage":1.0,"endPage":2.0}""".parseJson + val metaJsonWithoutPredicted = """{"startPage":1.0,"endPage":2.0}""".parseJson val parsedMetaWithoutPredicted = documentMetaFormat.read(metaJsonWithoutPredicted) parsedMetaWithoutPredicted should be(meta) - val metaJsonWithPredicted = """{"predicted":true,"startPage":1.0,"endPage":2.0}""".parseJson + val metaJsonWithPredicted = """{"predicted":true,"startPage":1.0,"endPage":2.0}""".parseJson val parsedMetaWithPredicted = documentMetaFormat.read(metaJsonWithPredicted) parsedMetaWithPredicted should be(meta.copy(predicted = Some(true))) } |