mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
make channel unit tests
This commit is contained in:
parent
40a142064f
commit
bbd76ab75a
4 changed files with 34 additions and 25 deletions
22
app/src/androidTest/java/com/geeksville/mesh/ChannelTest.kt
Normal file
22
app/src/androidTest/java/com/geeksville/mesh/ChannelTest.kt
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
package com.geeksville.mesh
|
||||
|
||||
|
||||
import androidx.compose.frames.open
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import com.geeksville.mesh.model.Channel
|
||||
import org.junit.Assert
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class ChannelTest {
|
||||
@Test
|
||||
fun channelUrlGood() {
|
||||
open() // Needed to make Compose think we are inside a Frame
|
||||
val ch = Channel.emulated
|
||||
|
||||
Assert.assertTrue(ch.getChannelUrl().toString().startsWith(Channel.prefix))
|
||||
Assert.assertEquals(Channel(ch.getChannelUrl()), ch)
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue