diff --git a/build.gradle b/build.gradle index 3d975af..ebacded 100644 --- a/build.gradle +++ b/build.gradle @@ -17,13 +17,21 @@ repositories { mavenCentral() } +test { + useJUnitPlatform() +} + dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8" compile "com.google.code.gson:gson:2.8.5" compile "com.squareup.okhttp3:okhttp:3.12.2" + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1' + + testCompileOnly 'junit:junit:4.12' + testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.3.1' - testCompile group: 'junit', name: 'junit', version: '4.12' testCompile group: 'com.google.truth', name: 'truth', version: '0.44' testCompile group: 'org.mockito', name: 'mockito-core', version: '2.27.0' testCompile group: 'com.nhaarman.mockitokotlin2', name: 'mockito-kotlin', version: '2.1.0' diff --git a/src/test/kotlin/org/phoenixframework/ExampleTest.kt b/src/test/kotlin/org/phoenixframework/ExampleTest.kt new file mode 100644 index 0000000..7689162 --- /dev/null +++ b/src/test/kotlin/org/phoenixframework/ExampleTest.kt @@ -0,0 +1,25 @@ +package org.phoenixframework + +import com.google.common.truth.Truth.assertThat +import org.junit.jupiter.api.DisplayName +import org.junit.jupiter.api.Nested +import org.junit.jupiter.api.Test + +class ExampleTest { + @Test + internal fun `should fail`() { +// assertThat(true).isFalse() + assertThat(true).isTrue() + } + + @Nested + @DisplayName("nested test") + inner class NestedTest { + + @Test + internal fun `does fail`() { + assertThat(false).isFalse() + } + } +} +