Rewrites MealDataTest with matchers

Issue #2745
This commit is contained in:
Ryan Haining 2023-09-20 22:16:25 -07:00
parent cfb003af01
commit a46e396815

View file

@ -1,13 +1,13 @@
package info.nightscout.core.data package info.nightscout.core.data
import com.google.common.truth.Truth.assertThat
import info.nightscout.interfaces.iob.MealData import info.nightscout.interfaces.iob.MealData
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test import org.junit.jupiter.api.Test
class MealDataTest { class MealDataTest {
@Test fun canCreateObject() { @Test fun canCreateObject() {
val md = MealData() val md = MealData()
Assertions.assertEquals(0.0, md.carbs, 0.01) assertThat(md.carbs).isWithin(0.01).of(0.0)
} }
} }