11package com.fasterxml.jackson.module.kotlin
22
33import com.fasterxml.jackson.annotation.JsonCreator
4- import org.junit.Ignore
5- import org.junit.experimental.runners.Enclosed
6- import org.junit.runner.RunWith
4+ import org.junit.jupiter.api.Nested
75import kotlin.reflect.KFunction
86import kotlin.reflect.full.functions
97import kotlin.reflect.full.hasAnnotation
@@ -12,13 +10,19 @@ import kotlin.test.assertEquals
1210import kotlin.test.assertFalse
1311import kotlin.test.assertTrue
1412
15-
16- @RunWith(Enclosed ::class )
1713class ArgumentBucketTest {
18- class Normal {
19- @Ignore
20- data class Constructor (val foo : String , val bar : String )
14+ data class Constructor (val foo : String , val bar : String )
15+
16+ data class Method (val foo : String , val bar : String ) {
17+ companion object {
18+ @JvmStatic
19+ @JsonCreator
20+ fun of (foo : String , bar : String ): Method = Method (foo, bar)
21+ }
22+ }
2123
24+ @Nested
25+ inner class Normal {
2226 @Test
2327 fun constructorTest () {
2428 val function: KFunction <* > = ::Constructor
@@ -45,15 +49,6 @@ class ArgumentBucketTest {
4549 assertEquals(" bar" , bucket[params[1 ]])
4650 }
4751
48- @Ignore
49- data class Method (val foo : String , val bar : String ) {
50- companion object {
51- @JvmStatic
52- @JsonCreator
53- fun of (foo : String , bar : String ): Method = Method (foo, bar)
54- }
55- }
56-
5752 @Test
5853 fun methodTest () {
5954 val function: KFunction <* > = Method .Companion ::class .functions.first { it.hasAnnotation<JsonCreator >() }
0 commit comments