Meshtastic-Android/app/src/test/java/com/geeksville/mesh/model/ChannelSetTest.kt
2022-09-18 20:23:34 -03:00

17 lines
539 B
Kotlin

package com.geeksville.mesh.model
import android.net.Uri
import org.junit.Assert
import org.junit.Test
class ChannelSetTest {
/** make sure we match the python and device code behavior */
@Test
fun matchPython() {
val url = Uri.parse("https://www.meshtastic.org/e/#CgUYAiIBAQ")
val cs = ChannelSet(url)
Assert.assertEquals("LongFast", cs.primaryChannel!!.name)
Assert.assertEquals("#LongFast-K", cs.primaryChannel!!.humanName)
Assert.assertEquals(url, cs.getChannelUrl(false))
}
}