Rewrites PairTest with matchers

Issue #2745
This commit is contained in:
Ryan Haining 2023-09-18 20:23:29 -07:00
parent a42ef55cb0
commit fa49e3e152

View file

@ -1,7 +1,6 @@
package info.nightscout.androidaps.interaction.utils
import com.google.common.truth.Truth.assertThat
import org.junit.Assert
import org.junit.jupiter.api.Test
class PairTest {
@ -19,14 +18,14 @@ class PairTest {
val no4: Pair<*, *> = Pair.create(12, 345L)
// THEN
Assert.assertNotEquals(left, right)
Assert.assertEquals(left, another)
Assert.assertNotEquals(left, samePos1)
Assert.assertNotEquals(left, samePos2)
Assert.assertNotEquals(no1, no2)
Assert.assertNotEquals(no1, no3)
Assert.assertEquals(no1, no4)
Assert.assertNotEquals("aa bbb", left.toString())
assertThat(right).isNotEqualTo(left)
assertThat(another).isEqualTo(left)
assertThat(samePos1).isNotEqualTo(left)
assertThat(samePos2).isNotEqualTo(left)
assertThat(no2).isNotEqualTo(no1)
assertThat(no3).isNotEqualTo(no1)
assertThat(no4).isEqualTo(no1)
assertThat(left.toString()).isNotEqualTo("aa bbb")
}
@Test fun pairHashTest() {