You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
430 B
Kotlin
22 lines
430 B
Kotlin
3 years ago
|
package org.mozilla.fenix.tabstray.ext
|
||
|
|
||
|
import org.junit.Assert.assertEquals
|
||
|
import org.junit.Test
|
||
|
|
||
|
class LongKtTest {
|
||
|
|
||
|
@Test
|
||
|
fun `WHEN value is null THEN default is returned`() {
|
||
|
val value: Long? = null
|
||
|
|
||
|
assertEquals(value.orDefault(), -1L)
|
||
|
}
|
||
|
|
||
|
@Test
|
||
|
fun `WHEN value is not null THEN value is returned`() {
|
||
|
val value: Long? = 100L
|
||
|
|
||
|
assertEquals(value.orDefault(), 100L)
|
||
|
}
|
||
|
}
|