Added JUnit to tests
This commit is contained in:
parent
d005944874
commit
6dd83d0073
2 changed files with 13 additions and 17 deletions
|
@ -1,18 +1,11 @@
|
|||
package com.example
|
||||
|
||||
class ExampleTest {
|
||||
fun verifyHello() {
|
||||
if ("Hello World!" != Example().message) {
|
||||
throw AssertionError()
|
||||
} else {
|
||||
println("Succeeded")
|
||||
}
|
||||
}
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun main(args: Array<String>) {
|
||||
ExampleTest().verifyHello()
|
||||
}
|
||||
class ExampleTest {
|
||||
@Test
|
||||
fun verifyHello() {
|
||||
assertEquals("Hello World!", Example().message)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue