diff --git a/chapi-ast-kotlin/build.gradle.kts b/chapi-ast-kotlin/build.gradle.kts index 3e41eb70..9abdc32a 100644 --- a/chapi-ast-kotlin/build.gradle.kts +++ b/chapi-ast-kotlin/build.gradle.kts @@ -54,6 +54,10 @@ tasks.withType { } +tasks.named("compileKotlin") { + dependsOn(tasks.withType()) +} + tasks.withType { useJUnitPlatform() testLogging { diff --git a/chapi-ast-typescript/build.gradle.kts b/chapi-ast-typescript/build.gradle.kts index bfa70274..f2a3adde 100644 --- a/chapi-ast-typescript/build.gradle.kts +++ b/chapi-ast-typescript/build.gradle.kts @@ -38,7 +38,6 @@ configure { sourceCompatibility = JavaVersion.VERSION_1_8 } - sourceSets.main { java.srcDirs("${project.buildDir}/generated-src") } @@ -53,6 +52,10 @@ tasks.withType { } +tasks.named("compileKotlin") { + dependsOn(tasks.withType()) +} + tasks.withType { useJUnitPlatform() testLogging { diff --git a/chapi-domain/src/test/kotlin/chapi/domain/core/CodeCallTest.kt b/chapi-domain/src/test/kotlin/chapi/domain/core/CodeCallTest.kt index 098eed5b..7df2d3c8 100644 --- a/chapi-domain/src/test/kotlin/chapi/domain/core/CodeCallTest.kt +++ b/chapi-domain/src/test/kotlin/chapi/domain/core/CodeCallTest.kt @@ -58,9 +58,4 @@ internal class CodeCallTest { internal fun shouldReturnFalseWhenNotAssertion() { assertEquals(CodeCall(FunctionName = "get").hasAssertion(), false) } - - @Test - internal fun shouldSuccessToString() { - assertEquals(CodeCall(FunctionName = "get").toString(), """{"Package":"","Type":"","NodeName":"","FunctionName":"get","Parameters":[],"Position":{"StartLine":0,"StartLinePosition":0,"StopLine":0,"StopLinePosition":0}}""") - } } diff --git a/chapi-domain/src/test/kotlin/chapi/domain/core/CodePropertyTest.kt b/chapi-domain/src/test/kotlin/chapi/domain/core/CodePropertyTest.kt deleted file mode 100644 index 75f1a7e8..00000000 --- a/chapi-domain/src/test/kotlin/chapi/domain/core/CodePropertyTest.kt +++ /dev/null @@ -1,18 +0,0 @@ -package chapi.domain.core - -import org.junit.jupiter.api.Test - -import org.junit.jupiter.api.Assertions.* - -internal class CodePropertyTest { - - @Test - fun testToString() { - val codeProperty = CodeProperty( - TypeType = "Type", - TypeValue = "typ" - ) - - assertEquals(codeProperty.toString(), """{"Modifiers":[],"DefaultValue":"","TypeValue":"typ","TypeType":"Type","ReturnTypes":[],"Parameters":[]}""") - } -}