From 1e504a870370a1af8ebb2f9711ba5a715e290764 Mon Sep 17 00:00:00 2001 From: andrekir Date: Thu, 26 Jan 2023 22:41:12 -0300 Subject: [PATCH] fix: update unit tests --- .../androidTest/java/com/geeksville/mesh/ChannelTest.kt | 8 ++++---- app/src/test/java/com/geeksville/mesh/ui/UIUnitTest.kt | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/src/androidTest/java/com/geeksville/mesh/ChannelTest.kt b/app/src/androidTest/java/com/geeksville/mesh/ChannelTest.kt index adb8e32c..8788167b 100644 --- a/app/src/androidTest/java/com/geeksville/mesh/ChannelTest.kt +++ b/app/src/androidTest/java/com/geeksville/mesh/ChannelTest.kt @@ -1,7 +1,7 @@ package com.geeksville.mesh import androidx.test.ext.junit.runners.AndroidJUnit4 -import com.geeksville.mesh.model.Channel +import com.geeksville.mesh.model.ChannelSet import org.junit.Assert import org.junit.Test import org.junit.runner.RunWith @@ -10,9 +10,9 @@ import org.junit.runner.RunWith class ChannelTest { @Test fun channelUrlGood() { - val ch = Channel.emulated + val ch = ChannelSet() - Assert.assertTrue(ch.getChannelUrl().toString().startsWith(Channel.prefix)) - Assert.assertEquals(Channel(ch.getChannelUrl()), ch) + Assert.assertTrue(ch.getChannelUrl().toString().startsWith(ChannelSet.prefix)) + Assert.assertEquals(ChannelSet(ch.getChannelUrl()), ch) } } \ No newline at end of file diff --git a/app/src/test/java/com/geeksville/mesh/ui/UIUnitTest.kt b/app/src/test/java/com/geeksville/mesh/ui/UIUnitTest.kt index 6d5f5631..4fa45969 100644 --- a/app/src/test/java/com/geeksville/mesh/ui/UIUnitTest.kt +++ b/app/src/test/java/com/geeksville/mesh/ui/UIUnitTest.kt @@ -13,10 +13,10 @@ class UIUnitTest { @Test fun initialsGood() { Assert.assertEquals("KH", getInitials("Kevin Hester")) - Assert.assertEquals("KHL", getInitials(" Kevin Hester Lesser Cat ")) + Assert.assertEquals("KHLC", getInitials(" Kevin Hester Lesser Cat ")) Assert.assertEquals("", getInitials(" ")) - Assert.assertEquals("gks", getInitials("geeksville")) - Assert.assertEquals("gee", getInitials("geek")) - Assert.assertEquals("gks", getInitials("geeks")) + Assert.assertEquals("gksv", getInitials("geeksville")) + Assert.assertEquals("geek", getInitials("geek")) + Assert.assertEquals("gks1", getInitials("geeks1")) } }