From 9665fe692681bc958e55d00cc0d0b238b7aee694 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sat, 3 Feb 2018 23:21:46 +0100 Subject: Refactoring for kdoc API documentation with dokka --- .../test/kotlin/test/com/example/HelloworldSpec.kt | 21 -------------- .../src/test/kotlin/test/com/example/TestUtil.kt | 32 ---------------------- 2 files changed, 53 deletions(-) delete mode 100644 examples/helloworld/src/test/kotlin/test/com/example/HelloworldSpec.kt delete mode 100644 examples/helloworld/src/test/kotlin/test/com/example/TestUtil.kt (limited to 'examples/helloworld/src/test') diff --git a/examples/helloworld/src/test/kotlin/test/com/example/HelloworldSpec.kt b/examples/helloworld/src/test/kotlin/test/com/example/HelloworldSpec.kt deleted file mode 100644 index 8054c000..00000000 --- a/examples/helloworld/src/test/kotlin/test/com/example/HelloworldSpec.kt +++ /dev/null @@ -1,21 +0,0 @@ -package test.com.example - -import com.example.Helloworld -import kotlin.browser.document -import kotlin.test.Test -import kotlin.test.assertTrue - -class HelloworldSpec : DomSpec { - - @Test - fun render() { - run { - Helloworld().start(mapOf()) - val element = document.getElementById("helloworld") - assertTrue( - element?.innerHTML?.contains("Hello world!") ?: false, - "Application should render Hello world! text" - ) - } - } -} diff --git a/examples/helloworld/src/test/kotlin/test/com/example/TestUtil.kt b/examples/helloworld/src/test/kotlin/test/com/example/TestUtil.kt deleted file mode 100644 index c5ec014f..00000000 --- a/examples/helloworld/src/test/kotlin/test/com/example/TestUtil.kt +++ /dev/null @@ -1,32 +0,0 @@ -package test.com.example - -import pl.treksoft.jquery.jQuery -import kotlin.browser.document - -interface TestSpec { - fun beforeTest() - - fun afterTest() - - fun run(code: () -> Unit) { - beforeTest() - code() - afterTest() - } -} - -interface DomSpec : TestSpec { - - override fun beforeTest() { - val fixture = "
" + - "
" - document.body?.insertAdjacentHTML("afterbegin", fixture) - } - - override fun afterTest() { - val div = document.getElementById("pretest") - div?.remove() - jQuery(`object` = ".modal-backdrop").remove() - } - -} -- cgit