From 8dea90d7c9a3ee7a370840aa62a070ca8aacbb2a Mon Sep 17 00:00:00 2001 From: Mathias Date: Thu, 26 May 2011 22:24:44 +0200 Subject: Add more collection formats --- src/test/scala/cc/spray/json/CollectionFormatsSpec.scala | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/test/scala/cc/spray') 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 } } -- cgit v1.2.3