parent
36ce238cc9
commit
89bd176996
1 changed files with 5 additions and 4 deletions
|
@ -1,5 +1,6 @@
|
||||||
package info.nightscout.androidaps.interaction.utils
|
package info.nightscout.androidaps.interaction.utils
|
||||||
|
|
||||||
|
import com.google.common.truth.Truth.assertThat
|
||||||
import org.junit.Assert
|
import org.junit.Assert
|
||||||
import org.junit.jupiter.api.Test
|
import org.junit.jupiter.api.Test
|
||||||
|
|
||||||
|
@ -34,15 +35,15 @@ class PairTest {
|
||||||
val set: MutableSet<Pair<*, *>> = HashSet()
|
val set: MutableSet<Pair<*, *>> = HashSet()
|
||||||
|
|
||||||
// THEN
|
// THEN
|
||||||
Assert.assertFalse(set.contains(inserted))
|
assertThat(set).doesNotContain(inserted)
|
||||||
set.add(inserted)
|
set.add(inserted)
|
||||||
Assert.assertTrue(set.contains(inserted))
|
assertThat(set).contains(inserted)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun toStringTest() {
|
@Test fun toStringTest() {
|
||||||
// GIVEN
|
// GIVEN
|
||||||
val pair: Pair<*, *> = Pair.create("the-first", "2nd")
|
val pair: Pair<*, *> = Pair.create("the-first", "2nd")
|
||||||
Assert.assertTrue(pair.toString().contains("the-first"))
|
assertThat(pair.toString()).contains("the-first")
|
||||||
Assert.assertTrue(pair.toString().contains("2nd"))
|
assertThat(pair.toString()).contains("2nd")
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue