parent
cef8ba00dd
commit
483077e666
|
@ -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.Bolus
|
import info.nightscout.database.entities.Bolus
|
||||||
import info.nightscout.database.entities.embedments.InterfaceIDs
|
import info.nightscout.database.entities.embedments.InterfaceIDs
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSBolus
|
import info.nightscout.sdk.localmodel.treatment.NSBolus
|
||||||
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
|
||||||
|
|
||||||
|
@ -29,8 +29,8 @@ internal class BolusExtensionKtTest {
|
||||||
)
|
)
|
||||||
|
|
||||||
var bolus2 = (bolus.toNSBolus().convertToRemoteAndBack() as NSBolus).toBolus()
|
var bolus2 = (bolus.toNSBolus().convertToRemoteAndBack() as NSBolus).toBolus()
|
||||||
Assertions.assertTrue(bolus.contentEqualsTo(bolus2))
|
assertThat(bolus.contentEqualsTo(bolus2)).isTrue()
|
||||||
Assertions.assertTrue(bolus.interfaceIdsEqualsTo(bolus2))
|
assertThat(bolus.interfaceIdsEqualsTo(bolus2)).isTrue()
|
||||||
|
|
||||||
bolus = Bolus(
|
bolus = Bolus(
|
||||||
timestamp = 10000,
|
timestamp = 10000,
|
||||||
|
@ -48,7 +48,7 @@ internal class BolusExtensionKtTest {
|
||||||
)
|
)
|
||||||
|
|
||||||
bolus2 = (bolus.toNSBolus().convertToRemoteAndBack() as NSBolus).toBolus()
|
bolus2 = (bolus.toNSBolus().convertToRemoteAndBack() as NSBolus).toBolus()
|
||||||
Assertions.assertTrue(bolus.contentEqualsTo(bolus2))
|
assertThat(bolus.contentEqualsTo(bolus2)).isTrue()
|
||||||
Assertions.assertTrue(bolus.interfaceIdsEqualsTo(bolus2))
|
assertThat(bolus.interfaceIdsEqualsTo(bolus2)).isTrue()
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue