mirror of
https://github.com/MinimalBible/MinimalBible
synced 2025-07-05 15:54:44 -04:00
Code coverage is working!
Been trying so long to get this running, so happy to have it done.
This commit is contained in:
@ -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(""), "")
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user