Rewrites InputCarePortalEventTest with matchers

Issue #2745
This commit is contained in:
Ryan Haining 2023-10-04 21:08:54 -07:00
parent 59215f03e5
commit d4c3f21bee

View file

@ -1,19 +1,19 @@
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 InputCarePortalEventTest : TriggerTestBase() {
@Test
fun labelsTest() {
Assertions.assertEquals(4, InputCarePortalMenu.EventType.labels(rh).size)
assertThat(InputCarePortalMenu.EventType.labels(rh)).hasSize(4)
}
@Test
fun setValueTest() {
val cp = InputCarePortalMenu(rh, InputCarePortalMenu.EventType.EXERCISE)
Assertions.assertEquals(InputCarePortalMenu.EventType.EXERCISE, cp.value)
assertThat(cp.value).isEqualTo(InputCarePortalMenu.EventType.EXERCISE)
}
}
}