Skip to content

Commit 559e38c

Browse files
committed
Update CaseClassSerializerTest.scala
1 parent fe2c814 commit 559e38c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/test/scala/tools/jackson/module/scala/ser/CaseClassSerializerTest.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package tools.jackson.module.scala.ser
22

33
import com.fasterxml.jackson.annotation.JsonProperty.Access
44
import com.fasterxml.jackson.annotation._
5-
import tools.jackson.databind.{ObjectMapper, PropertyNamingStrategies}
5+
import tools.jackson.databind.{MapperFeature, ObjectMapper, PropertyNamingStrategies}
66
import tools.jackson.module.scala.DefaultScalaModule
77

88
import scala.beans.BeanProperty
@@ -186,8 +186,10 @@ class CaseClassSerializerTest extends SerializerTest {
186186
def isBoolean = boolean
187187
}
188188
val foo = new Foo("str", false)
189-
// JSON order for non-constructor params changed in Jackson 3 due to https://github.com/FasterXML/jackson-databind/pull/4572
190-
serialize(foo) should equal ("""{"boolean":false,"string":"str"}""")
189+
val mapper = newBuilder
190+
.disable(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY)
191+
.build()
192+
serialize(foo) should equal ("""{"string":"str","boolean":false}""")
191193
}
192194

193195
it should "serialize java getters returning java collections" in {

0 commit comments

Comments
 (0)