parent
483077e666
commit
4543988be9
1 changed files with 6 additions and 6 deletions
|
@ -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.Carbs
|
import info.nightscout.database.entities.Carbs
|
||||||
import info.nightscout.database.entities.embedments.InterfaceIDs
|
import info.nightscout.database.entities.embedments.InterfaceIDs
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSCarbs
|
import info.nightscout.sdk.localmodel.treatment.NSCarbs
|
||||||
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")
|
||||||
|
@ -27,8 +27,8 @@ internal class CarbsExtensionKtTest {
|
||||||
)
|
)
|
||||||
|
|
||||||
var carbs2 = (carbs.toNSCarbs().convertToRemoteAndBack() as NSCarbs).toCarbs()
|
var carbs2 = (carbs.toNSCarbs().convertToRemoteAndBack() as NSCarbs).toCarbs()
|
||||||
Assertions.assertTrue(carbs.contentEqualsTo(carbs2))
|
assertThat(carbs.contentEqualsTo(carbs2)).isTrue()
|
||||||
Assertions.assertTrue(carbs.interfaceIdsEqualsTo(carbs2))
|
assertThat(carbs.interfaceIdsEqualsTo(carbs2)).isTrue()
|
||||||
|
|
||||||
carbs = Carbs(
|
carbs = Carbs(
|
||||||
timestamp = 10000,
|
timestamp = 10000,
|
||||||
|
@ -45,7 +45,7 @@ internal class CarbsExtensionKtTest {
|
||||||
)
|
)
|
||||||
|
|
||||||
carbs2 = (carbs.toNSCarbs().convertToRemoteAndBack() as NSCarbs).toCarbs()
|
carbs2 = (carbs.toNSCarbs().convertToRemoteAndBack() as NSCarbs).toCarbs()
|
||||||
Assertions.assertTrue(carbs.contentEqualsTo(carbs2))
|
assertThat(carbs.contentEqualsTo(carbs2)).isTrue()
|
||||||
Assertions.assertTrue(carbs.interfaceIdsEqualsTo(carbs2))
|
assertThat(carbs.interfaceIdsEqualsTo(carbs2)).isTrue()
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue