File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed
scala-2.13/tools/jackson/module/scala/ser
scala-3/tools/jackson/module/scala/ser Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ package tools .jackson .module .scala .ser
2
+
3
+ import tools .jackson .module .scala .{DefaultScalaModule , JacksonModule }
4
+
5
+ import scala .collection .immutable .TreeSeqMap
6
+ import scala .collection .mutable
7
+
8
+ class Map2SerializerTest extends SerializerTest {
9
+
10
+ lazy val module : JacksonModule = DefaultScalaModule
11
+
12
+ " MapSerializerModule" should " serialize a TreeSeqMap" in {
13
+ val result = serialize(TreeSeqMap (" a" -> 1 , " b" -> " two" , " c" -> false ))
14
+ result shouldEqual """ {"a":1,"b":"two","c":false}"""
15
+ }
16
+
17
+ it should " serialize a CollisionProofHashMap" in {
18
+ val result = serialize(mutable.CollisionProofHashMap (" a" -> 1 , " b" -> " two" , " c" -> false ))
19
+ result shouldEqual """ {"a":1,"b":"two","c":false}"""
20
+ }
21
+ }
Original file line number Diff line number Diff line change
1
+ package tools .jackson .module .scala .ser
2
+
3
+ import tools .jackson .module .scala .{DefaultScalaModule , JacksonModule }
4
+
5
+ import scala .collection .immutable .TreeSeqMap
6
+ import scala .collection .mutable
7
+
8
+ class Map2SerializerTest extends SerializerTest {
9
+
10
+ lazy val module : JacksonModule = DefaultScalaModule
11
+
12
+ " MapSerializerModule" should " serialize a TreeSeqMap" in {
13
+ val result = serialize(TreeSeqMap (" a" -> 1 , " b" -> " two" , " c" -> false ))
14
+ result shouldEqual """ {"a":1,"b":"two","c":false}"""
15
+ }
16
+
17
+ it should " serialize a CollisionProofHashMap" in {
18
+ val result = serialize(mutable.CollisionProofHashMap (" a" -> 1 , " b" -> " two" , " c" -> false ))
19
+ result shouldEqual """ {"a":1,"b":"two","c":false}"""
20
+ }
21
+ }
You can’t perform that action at this time.
0 commit comments