Rewrites BolusCalculatorResultExtensionKtTest with matchers

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

View file

@ -1,10 +1,10 @@
package info.nightscout.plugins.sync.nsclientV3.extensions package info.nightscout.plugins.sync.nsclientV3.extensions
import com.google.common.truth.Truth.assertThat
import info.nightscout.database.entities.BolusCalculatorResult import info.nightscout.database.entities.BolusCalculatorResult
import info.nightscout.database.entities.embedments.InterfaceIDs import info.nightscout.database.entities.embedments.InterfaceIDs
import info.nightscout.sdk.localmodel.treatment.NSBolusWizard import info.nightscout.sdk.localmodel.treatment.NSBolusWizard
import info.nightscout.sdk.mapper.convertToRemoteAndBack import info.nightscout.sdk.mapper.convertToRemoteAndBack
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test import org.junit.jupiter.api.Test
@Suppress("SpellCheckingInspection") @Suppress("SpellCheckingInspection")
@ -53,7 +53,7 @@ internal class BolusCalculatorResultExtensionKtTest {
) )
val bolus2 = (bolus.toNSBolusWizard().convertToRemoteAndBack() as NSBolusWizard).toBolusCalculatorResult()!! val bolus2 = (bolus.toNSBolusWizard().convertToRemoteAndBack() as NSBolusWizard).toBolusCalculatorResult()!!
Assertions.assertTrue(bolus.contentEqualsTo(bolus2)) assertThat(bolus.contentEqualsTo(bolus2)).isTrue()
Assertions.assertTrue(bolus.interfaceIdsEqualsTo(bolus2)) assertThat(bolus.interfaceIdsEqualsTo(bolus2)).isTrue()
} }
} }