Code coverage is working!

Been trying so long to get this running, so happy to have it done.
This commit is contained in:
Bradlee Speice
2014-11-17 13:35:15 -05:00
parent 8d6a3b0d84
commit cb8ea71f62
8 changed files with 64 additions and 57 deletions

View File

@ -0,0 +1,25 @@
package org.bspeice.minimalbible
import org.junit.Before
import org.junit.Test
import kotlin.properties.Delegates
class SafeValDelegateKotlinTest {
var delegate: SafeValDelegate<String> by Delegates.notNull()
Before fun setUp() {
delegate = SafeValDelegate()
}
Test(expected = javaClass<IllegalStateException>())
fun testDelegateNullSafety() {
delegate.get(null, PropertyMetadataImpl(""))
}
Test(expected = javaClass<IllegalStateException>())
fun testDelegateAssignOnce() {
delegate.set(null, PropertyMetadataImpl(""), "")
delegate.set(null, PropertyMetadataImpl(""), "")
}
}