diff --git a/build.gradle b/build.gradle index a5d29dd..3a587b5 100644 --- a/build.gradle +++ b/build.gradle @@ -12,6 +12,8 @@ repositories { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" + + testImplementation "org.junit.jupiter:junit-jupiter:5.5.2" } compileKotlin { @@ -21,6 +23,13 @@ compileTestKotlin { kotlinOptions.jvmTarget = "1.8" } +test { + useJUnitPlatform() + testLogging { + events "passed", "skipped", "failed" + } +} + Properties properties = new Properties() File file = rootProject.file('local.properties') if (file.exists()) { diff --git a/src/test/kotlin/net/volcanomobile/weservsdk/WeservTests.kt b/src/test/kotlin/net/volcanomobile/weservsdk/WeservTests.kt new file mode 100644 index 0000000..4d92ceb --- /dev/null +++ b/src/test/kotlin/net/volcanomobile/weservsdk/WeservTests.kt @@ -0,0 +1,14 @@ +package net.volcanomobile.weservsdk + +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Test + +class WeservTests { + + @Test + fun `no Url throws exception`() { + Assertions.assertThrows(IllegalArgumentException::class.java) { + weserv { } + } + } +} \ No newline at end of file