Rewrites ComparatorConnectTest with matchers

Issue #2745
This commit is contained in:
Ryan Haining 2023-10-04 20:49:50 -07:00
parent 53961a4104
commit 1466092a59

View file

@ -1,18 +1,18 @@
package app.aaps.plugins.automation.elements
import app.aaps.plugins.automation.triggers.TriggerTestBase
import org.junit.jupiter.api.Assertions
import com.google.common.truth.Truth.assertThat
import org.junit.jupiter.api.Test
class ComparatorConnectTest : TriggerTestBase() {
@Test fun labelsTest() {
Assertions.assertEquals(2, ComparatorConnect.Compare.labels(rh).size)
assertThat(ComparatorConnect.Compare.labels(rh)).hasSize(2)
}
@Test fun setValueTest() {
val c = ComparatorConnect(rh)
c.value = ComparatorConnect.Compare.ON_DISCONNECT
Assertions.assertEquals(ComparatorConnect.Compare.ON_DISCONNECT, c.value)
assertThat(c.value).isEqualTo(ComparatorConnect.Compare.ON_DISCONNECT)
}
}
}