diff options
author | Mathias <mathias@spray.cc> | 2011-09-27 21:43:45 +0200 |
---|---|---|
committer | Mathias <mathias@spray.cc> | 2011-09-27 21:43:45 +0200 |
commit | 48b6d35942963b412810b3cc61d3c3ca7f79f513 (patch) | |
tree | 238938cf8c6bdcbf170a8f2ba33843dfc50d5915 /src/test/scala | |
parent | 408567fd7508166a0fa323bd6cd435f81259a635 (diff) | |
download | spray-json-48b6d35942963b412810b3cc61d3c3ca7f79f513.tar.gz spray-json-48b6d35942963b412810b3cc61d3c3ca7f79f513.tar.bz2 spray-json-48b6d35942963b412810b3cc61d3c3ca7f79f513.zip |
Add test case for jsonFormat order agnosticity
Diffstat (limited to 'src/test/scala')
-rw-r--r-- | src/test/scala/cc/spray/json/ProductFormatsSpec.scala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/scala/cc/spray/json/ProductFormatsSpec.scala b/src/test/scala/cc/spray/json/ProductFormatsSpec.scala index edd2481..763b4b0 100644 --- a/src/test/scala/cc/spray/json/ProductFormatsSpec.scala +++ b/src/test/scala/cc/spray/json/ProductFormatsSpec.scala @@ -26,6 +26,9 @@ class ProductFormatsSpec extends Specification with DefaultJsonProtocol { "ignore additional members during deserialization" in { JsObject(JsField("a", 42), JsField("b", 4.2), JsField("c", 'no)).fromJson[Test2] mustEqual obj } + "not depend on any specific member order for deserialization" in { + JsObject(JsField("b", 4.2), JsField("a", 42)).fromJson[Test2] mustEqual obj + } "throw a DeserializationException if the JsValue is not a JsObject" in ( JsNull.fromJson[Test2] must throwA(new DeserializationException("Object expected")) ) |