diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..61a9130 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index bc8d0a3..38167d7 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,7 +1,7 @@ - + \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index f087be2..adf5f58 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,12 +1,12 @@ plugins { id("maven") id("java") - id("org.jetbrains.kotlin.jvm") version "1.3.71" + id("org.jetbrains.kotlin.jvm") version "1.3.72" id("org.jlleitschuh.gradle.ktlint") version "9.2.1" } group = "com.mapk" -version = "0.10" +version = "0.11" java { sourceCompatibility = JavaVersion.VERSION_1_8 @@ -18,7 +18,7 @@ buildscript { } dependencies { - classpath(kotlin("gradle-plugin", version = "1.3.71")) + classpath(kotlin("gradle-plugin")) } } @@ -33,7 +33,7 @@ dependencies { implementation(group = "org.jetbrains", name = "annotations", version = "19.0.0") // https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter - testImplementation(group = "org.junit.jupiter", name = "junit-jupiter", version = "5.6.1") { + testImplementation(group = "org.junit.jupiter", name = "junit-jupiter", version = "5.6.2") { exclude(group = "org.junit.vintage", module = "junit-vintage-engine") } // https://mvnrepository.com/artifact/io.mockk/mockk diff --git a/src/test/kotlin/com/mapk/core/ArgumentBucketTest.kt b/src/test/kotlin/com/mapk/core/ArgumentBucketTest.kt index 0aaa633..b5622e0 100644 --- a/src/test/kotlin/com/mapk/core/ArgumentBucketTest.kt +++ b/src/test/kotlin/com/mapk/core/ArgumentBucketTest.kt @@ -9,6 +9,7 @@ import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.DisplayName import org.junit.jupiter.api.Nested import org.junit.jupiter.api.Test +import org.junit.jupiter.api.TestInstance import org.junit.jupiter.api.assertDoesNotThrow import org.junit.jupiter.api.assertThrows @@ -24,9 +25,11 @@ private fun sampleAnnotatedFunction(@KParameterRequireNonNull arg1: Any, arg2: A } @DisplayName("ArgumentBucketTestのテスト") +@TestInstance(TestInstance.Lifecycle.PER_CLASS) class ArgumentBucketTest { @Nested @DisplayName("シンプルな呼び出しのテスト") + @TestInstance(TestInstance.Lifecycle.PER_CLASS) inner class SimpleTest { private lateinit var argumentBucket: ArgumentBucket @@ -80,6 +83,7 @@ class ArgumentBucketTest { @Nested @DisplayName("アノテーションを付与した場合のテスト") + @TestInstance(TestInstance.Lifecycle.PER_CLASS) inner class AnnotatedParametersTest { @Test @DisplayName("non-null要求のテスト") diff --git a/src/test/kotlin/com/mapk/core/KFunctionForCallTest.kt b/src/test/kotlin/com/mapk/core/KFunctionForCallTest.kt index daf33ea..a9bd801 100644 --- a/src/test/kotlin/com/mapk/core/KFunctionForCallTest.kt +++ b/src/test/kotlin/com/mapk/core/KFunctionForCallTest.kt @@ -7,12 +7,15 @@ import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.DisplayName import org.junit.jupiter.api.Nested import org.junit.jupiter.api.Test +import org.junit.jupiter.api.TestInstance import org.junit.jupiter.api.assertDoesNotThrow import org.junit.jupiter.api.assertThrows +@TestInstance(TestInstance.Lifecycle.PER_CLASS) class KFunctionForCallTest { @Nested @DisplayName("初期化関連テスト") + @TestInstance(TestInstance.Lifecycle.PER_CLASS) inner class InitializeTest { // 空引数の関数 private fun dummy1() {} @@ -40,6 +43,7 @@ class KFunctionForCallTest { @Nested @DisplayName("呼び出し関連テスト") + @TestInstance(TestInstance.Lifecycle.PER_CLASS) inner class CallTest { @Test @DisplayName("コンパニオンオブジェクトから取得した場合")