Rewrites BolusExtensionKtTest with matchers

Issue #2745
This commit is contained in:
Ryan Haining 2023-09-23 20:46:50 -07:00
parent cef8ba00dd
commit 483077e666

View file

@ -1,10 +1,10 @@
package info.nightscout.plugins.sync.nsclientV3.extensions
import com.google.common.truth.Truth.assertThat
import info.nightscout.database.entities.Bolus
import info.nightscout.database.entities.embedments.InterfaceIDs
import info.nightscout.sdk.localmodel.treatment.NSBolus
import info.nightscout.sdk.mapper.convertToRemoteAndBack
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
@ -29,8 +29,8 @@ internal class BolusExtensionKtTest {
)
var bolus2 = (bolus.toNSBolus().convertToRemoteAndBack() as NSBolus).toBolus()
Assertions.assertTrue(bolus.contentEqualsTo(bolus2))
Assertions.assertTrue(bolus.interfaceIdsEqualsTo(bolus2))
assertThat(bolus.contentEqualsTo(bolus2)).isTrue()
assertThat(bolus.interfaceIdsEqualsTo(bolus2)).isTrue()
bolus = Bolus(
timestamp = 10000,
@ -48,7 +48,7 @@ internal class BolusExtensionKtTest {
)
bolus2 = (bolus.toNSBolus().convertToRemoteAndBack() as NSBolus).toBolus()
Assertions.assertTrue(bolus.contentEqualsTo(bolus2))
Assertions.assertTrue(bolus.interfaceIdsEqualsTo(bolus2))
assertThat(bolus.contentEqualsTo(bolus2)).isTrue()
assertThat(bolus.interfaceIdsEqualsTo(bolus2)).isTrue()
}
}
}