diff options
author | Mathias <mathias@spray.cc> | 2011-05-26 22:24:44 +0200 |
---|---|---|
committer | Mathias <mathias@spray.cc> | 2011-05-26 22:24:44 +0200 |
commit | 8dea90d7c9a3ee7a370840aa62a070ca8aacbb2a (patch) | |
tree | c501db1cd76e53188f51dd391508d94289dbcc51 /src/test/scala/cc/spray/json/CollectionFormatsSpec.scala | |
parent | 8297c7ae6f1a46df5887e7f3f1d23566b4bd1163 (diff) | |
download | spray-json-8dea90d7c9a3ee7a370840aa62a070ca8aacbb2a.tar.gz spray-json-8dea90d7c9a3ee7a370840aa62a070ca8aacbb2a.tar.bz2 spray-json-8dea90d7c9a3ee7a370840aa62a070ca8aacbb2a.zip |
Add more collection formats
Diffstat (limited to 'src/test/scala/cc/spray/json/CollectionFormatsSpec.scala')
-rw-r--r-- | src/test/scala/cc/spray/json/CollectionFormatsSpec.scala | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/test/scala/cc/spray/json/CollectionFormatsSpec.scala b/src/test/scala/cc/spray/json/CollectionFormatsSpec.scala index ba792a3..126b96a 100644 --- a/src/test/scala/cc/spray/json/CollectionFormatsSpec.scala +++ b/src/test/scala/cc/spray/json/CollectionFormatsSpec.scala @@ -51,15 +51,15 @@ class CollectionFormatsSpec extends Specification with DefaultJsonProtocol { json.fromJson[Set[Int]] mustEqual set } } - - "The mutableSetFormat" should { - val set = collection.mutable.Set(1, 2, 3) - val json = JsArray(JsNumber(1), JsNumber(3), JsNumber(2)) - "convert a collection.mutable.Set[Int] to a JsArray of JsNumbers" in { - set.toJson mustEqual json + + "The indexedSeqFormat" should { + val seq = collection.IndexedSeq(1, 2, 3) + val json = JsArray(JsNumber(1), JsNumber(2), JsNumber(3)) + "convert a Set[Int] to a JsArray of JsNumbers" in { + seq.toJson mustEqual json } - "convert a JsArray of JsNumbers to a collection.mutable.Set[Int]" in { - json.fromJson[collection.mutable.Set[Int]] mustEqual set + "convert a JsArray of JsNumbers to a IndexedSeq[Int]" in { + json.fromJson[collection.IndexedSeq[Int]] mustEqual seq } } |