sforkowany z mirror/meshtastic-android
fix: update unit tests
rodzic
9ea6dff385
commit
1e504a8703
|
@ -1,7 +1,7 @@
|
|||
package com.geeksville.mesh
|
||||
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import com.geeksville.mesh.model.Channel
|
||||
import com.geeksville.mesh.model.ChannelSet
|
||||
import org.junit.Assert
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
@ -10,9 +10,9 @@ import org.junit.runner.RunWith
|
|||
class ChannelTest {
|
||||
@Test
|
||||
fun channelUrlGood() {
|
||||
val ch = Channel.emulated
|
||||
val ch = ChannelSet()
|
||||
|
||||
Assert.assertTrue(ch.getChannelUrl().toString().startsWith(Channel.prefix))
|
||||
Assert.assertEquals(Channel(ch.getChannelUrl()), ch)
|
||||
Assert.assertTrue(ch.getChannelUrl().toString().startsWith(ChannelSet.prefix))
|
||||
Assert.assertEquals(ChannelSet(ch.getChannelUrl()), ch)
|
||||
}
|
||||
}
|
|
@ -13,10 +13,10 @@ class UIUnitTest {
|
|||
@Test
|
||||
fun initialsGood() {
|
||||
Assert.assertEquals("KH", getInitials("Kevin Hester"))
|
||||
Assert.assertEquals("KHL", getInitials(" Kevin Hester Lesser Cat "))
|
||||
Assert.assertEquals("KHLC", getInitials(" Kevin Hester Lesser Cat "))
|
||||
Assert.assertEquals("", getInitials(" "))
|
||||
Assert.assertEquals("gks", getInitials("geeksville"))
|
||||
Assert.assertEquals("gee", getInitials("geek"))
|
||||
Assert.assertEquals("gks", getInitials("geeks"))
|
||||
Assert.assertEquals("gksv", getInitials("geeksville"))
|
||||
Assert.assertEquals("geek", getInitials("geek"))
|
||||
Assert.assertEquals("gks1", getInitials("geeks1"))
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue