Skip to content

Commit 398387e

Browse files
committed
Migrate to JUnit5 notation
1 parent 277ae27 commit 398387e

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

src/test/kotlin/com/fasterxml/jackson/module/kotlin/ArgumentBucketTest.kt

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
package com.fasterxml.jackson.module.kotlin
22

33
import 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
75
import kotlin.reflect.KFunction
86
import kotlin.reflect.full.functions
97
import kotlin.reflect.full.hasAnnotation
@@ -12,13 +10,19 @@ import kotlin.test.assertEquals
1210
import kotlin.test.assertFalse
1311
import kotlin.test.assertTrue
1412

15-
16-
@RunWith(Enclosed::class)
1713
class 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

Comments
 (0)