File tree Expand file tree Collapse file tree
src/test/kotlin/io/github/projectmapk/jackson/module/kogera/zPorted/test/github/failing Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,16 +7,24 @@ import org.junit.jupiter.api.Assertions.assertEquals
77import org.junit.jupiter.api.Test
88
99class TestGithub474 {
10+ open class Parent (@JsonProperty(" parent-prop" ) val parent : String )
11+ class Child (@JsonProperty(" child-prop" ) val child : String ) : Parent(child)
12+
1013 @Test
1114 fun jsonPropertyAnnotationRespectedOnParentClass () {
12- open class Parent (@JsonProperty(" parent-prop" ) val parent : String )
13- class Child (@JsonProperty(" child-prop" ) val child : String ) : Parent(child)
14-
15- expectFailure<AssertionError >(" GitHub #474 has been fixed!" ) {
15+ val assertion = {
1616 assertEquals(
1717 """ {"child-prop":"foo","parent-prop":"foo"}""" ,
1818 defaultMapper.writeValueAsString(Child (" foo" ))
1919 )
2020 }
21+
22+ if (KotlinVersion (2 , 4 ) <= KotlinVersion .CURRENT ) {
23+ assertion()
24+ } else {
25+ expectFailure<AssertionError >(" GitHub #474 has been fixed!" ) {
26+ assertion()
27+ }
28+ }
2129 }
2230}
You can’t perform that action at this time.
0 commit comments