From aa689d75c71bc14204d14894e8098f1970966cb7 Mon Sep 17 00:00:00 2001 From: Ryan Haining Date: Sat, 23 Sep 2023 20:47:56 -0700 Subject: [PATCH] Rewrites TemporaryTargetExtensionKtTest with matchers Issue #2745 --- .../extensions/TemporaryTargetExtensionKtTest.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/sync/src/test/java/info/nightscout/plugins/sync/nsclientV3/extensions/TemporaryTargetExtensionKtTest.kt b/plugins/sync/src/test/java/info/nightscout/plugins/sync/nsclientV3/extensions/TemporaryTargetExtensionKtTest.kt index 835e8dcb96..49aef9daba 100644 --- a/plugins/sync/src/test/java/info/nightscout/plugins/sync/nsclientV3/extensions/TemporaryTargetExtensionKtTest.kt +++ b/plugins/sync/src/test/java/info/nightscout/plugins/sync/nsclientV3/extensions/TemporaryTargetExtensionKtTest.kt @@ -1,11 +1,11 @@ package info.nightscout.plugins.sync.nsclientV3.extensions import app.aaps.shared.tests.TestBaseWithProfile +import com.google.common.truth.Truth.assertThat import info.nightscout.database.entities.TemporaryTarget import info.nightscout.database.entities.embedments.InterfaceIDs import info.nightscout.sdk.localmodel.treatment.NSTemporaryTarget import info.nightscout.sdk.mapper.convertToRemoteAndBack -import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test @Suppress("SpellCheckingInspection") @@ -29,8 +29,8 @@ internal class TemporaryTargetExtensionKtTest : TestBaseWithProfile() { ) var temporaryTarget2 = (temporaryTarget.toNSTemporaryTarget().convertToRemoteAndBack() as NSTemporaryTarget).toTemporaryTarget() - Assertions.assertTrue(temporaryTarget.contentEqualsTo(temporaryTarget2)) - Assertions.assertTrue(temporaryTarget.interfaceIdsEqualsTo(temporaryTarget2)) + assertThat(temporaryTarget.contentEqualsTo(temporaryTarget2)).isTrue() + assertThat(temporaryTarget.interfaceIdsEqualsTo(temporaryTarget2)).isTrue() temporaryTarget = TemporaryTarget( timestamp = 10000, @@ -48,7 +48,7 @@ internal class TemporaryTargetExtensionKtTest : TestBaseWithProfile() { ) temporaryTarget2 = (temporaryTarget.toNSTemporaryTarget().convertToRemoteAndBack() as NSTemporaryTarget).toTemporaryTarget() - Assertions.assertTrue(temporaryTarget.contentEqualsTo(temporaryTarget2)) - Assertions.assertTrue(temporaryTarget.interfaceIdsEqualsTo(temporaryTarget2)) + assertThat(temporaryTarget.contentEqualsTo(temporaryTarget2)).isTrue() + assertThat(temporaryTarget.interfaceIdsEqualsTo(temporaryTarget2)).isTrue() } -} \ No newline at end of file +}