aboutsummaryrefslogtreecommitdiff
path: root/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/InterventionFormatSuite.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/InterventionFormatSuite.scala')
-rw-r--r--src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/InterventionFormatSuite.scala9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/InterventionFormatSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/InterventionFormatSuite.scala
index ebb5f3d..dad39c8 100644
--- a/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/InterventionFormatSuite.scala
+++ b/src/test/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/InterventionFormatSuite.scala
@@ -59,13 +59,12 @@ class InterventionFormatSuite extends FlatSpec with Matchers {
}
"Json format for InterventionType" should "read and write correct JSON" in {
- val interventionType = InterventionType(
- id = LongId(10),
- name = "type name"
- )
+ val interventionType = InterventionType.typeFromString("Surgery/Procedure")
val writtenJson = interventionTypeFormat.write(interventionType)
- writtenJson should be("""{"id":10,"name":"type name"}""".parseJson)
+ writtenJson should be(
+ """{"id":9,"name":"Surgery/Procedure","deliveryMethods":["Radio-Frequency Ablation (RFA)",
+ "Cryoablation","Therapeutic Conventional Surgery","Robotic Assisted Laparoscopic Surgery"]}""".parseJson)
val parsedInterventionType = interventionTypeFormat.read(writtenJson)
parsedInterventionType should be(interventionType)