Meshtastic-Android/app/src/test/java/com/geeksville/mesh/model/ChannelSetTest.kt
2021-03-19 21:27:41 +08:00

17 lines
No EOL
542 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/d/#CgUYAyIBAQ")
val cs = ChannelSet(url)
Assert.assertEquals("LongSlow", cs.primaryChannel!!.name, )
Assert.assertEquals("#LongSlow-V", cs.primaryChannel!!.humanName, )
Assert.assertEquals(url, cs.getChannelUrl(false))
}
}