2021-03-19 17:42:26 +08:00
|
|
|
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() {
|
2022-10-13 00:18:19 -03:00
|
|
|
val url = Uri.parse("https://meshtastic.org/e/#CgUYAiIBAQ")
|
2021-03-19 17:42:26 +08:00
|
|
|
val cs = ChannelSet(url)
|
2022-05-30 17:43:05 -03:00
|
|
|
Assert.assertEquals("LongFast", cs.primaryChannel!!.name)
|
2022-09-18 20:23:34 -03:00
|
|
|
Assert.assertEquals("#LongFast-K", cs.primaryChannel!!.humanName)
|
2022-05-30 17:43:05 -03:00
|
|
|
Assert.assertEquals(url, cs.getChannelUrl(false))
|
2021-03-19 17:42:26 +08:00
|
|
|
}
|
2022-02-15 23:50:27 -03:00
|
|
|
}
|