diff --git a/implementation/src/test/java/info/nightscout/implementation/profile/ProfileStoreTest.kt b/implementation/src/test/java/info/nightscout/implementation/profile/ProfileStoreTest.kt index 0f7eee5b5f..0c142e8ba7 100644 --- a/implementation/src/test/java/info/nightscout/implementation/profile/ProfileStoreTest.kt +++ b/implementation/src/test/java/info/nightscout/implementation/profile/ProfileStoreTest.kt @@ -1,47 +1,47 @@ package info.nightscout.implementation.profile +import com.google.common.truth.Truth.assertThat import info.nightscout.interfaces.profile.PureProfile import info.nightscout.sharedtests.TestBaseWithProfile -import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test internal class ProfileStoreTest : TestBaseWithProfile() { @Test fun getStartDateTest() { - Assertions.assertEquals(0, getValidProfileStore().getStartDate()) + assertThat(getValidProfileStore().getStartDate()).isEqualTo(0) } @Test fun getDefaultProfileTest() { - Assertions.assertTrue(getValidProfileStore().getDefaultProfile() is PureProfile) + assertThat(getValidProfileStore().getDefaultProfile()).isInstanceOf(PureProfile::class.java) } @Test fun getDefaultProfileJsonTest() { - Assertions.assertTrue(getValidProfileStore().getDefaultProfileJson()?.has("dia") ?: false) - Assertions.assertEquals(null, getInvalidProfileStore2().getDefaultProfileJson()) + assertThat(getValidProfileStore().getDefaultProfileJson()?.has("dia")).isTrue() + assertThat(getInvalidProfileStore2().getDefaultProfileJson()).isNull() } @Test fun getDefaultProfileNameTest() { - Assertions.assertEquals(TESTPROFILENAME, getValidProfileStore().getDefaultProfileName()) + assertThat(getValidProfileStore().getDefaultProfileName()).isEqualTo(TESTPROFILENAME) } @Test fun getProfileListTest() { - Assertions.assertEquals(1, getValidProfileStore().getProfileList().size) + assertThat(getValidProfileStore().getProfileList()).hasSize(1) } @Test fun getSpecificProfileTest() { - Assertions.assertTrue(getValidProfileStore().getSpecificProfile(TESTPROFILENAME) is PureProfile) + assertThat(getValidProfileStore().getSpecificProfile(TESTPROFILENAME)).isInstanceOf(PureProfile::class.java) } @Test fun allProfilesValidTest() { - Assertions.assertTrue(getValidProfileStore().allProfilesValid) - Assertions.assertFalse(getInvalidProfileStore1().allProfilesValid) - Assertions.assertFalse(getInvalidProfileStore2().allProfilesValid) + assertThat(getValidProfileStore().allProfilesValid).isTrue() + assertThat(getInvalidProfileStore1().allProfilesValid).isFalse() + assertThat(getInvalidProfileStore2().allProfilesValid).isFalse() } -} \ No newline at end of file +}