use unmock to test and fix the channel suffix generation to match device

This commit is contained in:
Kevin Hester 2021-03-19 17:42:26 +08:00
parent c405cdc200
commit 699d5076b5
6 changed files with 68 additions and 50 deletions

View file

@ -0,0 +1,16 @@
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, )
}
}