mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
17 lines
546 B
Kotlin
17 lines
546 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://meshtastic.org/e/#CgMSAQESBggBQANIAQ")
|
|
val cs = url.toChannelSet()
|
|
Assert.assertEquals("LongFast", cs.primaryChannel!!.name)
|
|
Assert.assertEquals("#LongFast-I", cs.primaryChannel!!.humanName)
|
|
Assert.assertEquals(url, cs.getChannelUrl(false))
|
|
}
|
|
}
|