parent
aa689d75c7
commit
c95cdc1c9b
|
@ -1,11 +1,11 @@
|
||||||
package info.nightscout.plugins.sync.nsclientV3.extensions
|
package info.nightscout.plugins.sync.nsclientV3.extensions
|
||||||
|
|
||||||
import app.aaps.shared.tests.TestBaseWithProfile
|
import app.aaps.shared.tests.TestBaseWithProfile
|
||||||
|
import com.google.common.truth.Truth.assertThat
|
||||||
import info.nightscout.database.entities.TherapyEvent
|
import info.nightscout.database.entities.TherapyEvent
|
||||||
import info.nightscout.database.entities.embedments.InterfaceIDs
|
import info.nightscout.database.entities.embedments.InterfaceIDs
|
||||||
import info.nightscout.sdk.localmodel.treatment.NSTherapyEvent
|
import info.nightscout.sdk.localmodel.treatment.NSTherapyEvent
|
||||||
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")
|
||||||
|
@ -32,8 +32,8 @@ internal class TherapyEventExtensionKtTest : TestBaseWithProfile() {
|
||||||
)
|
)
|
||||||
|
|
||||||
var therapyEvent2 = (therapyEvent.toNSTherapyEvent().convertToRemoteAndBack() as NSTherapyEvent).toTherapyEvent()
|
var therapyEvent2 = (therapyEvent.toNSTherapyEvent().convertToRemoteAndBack() as NSTherapyEvent).toTherapyEvent()
|
||||||
Assertions.assertTrue(therapyEvent.contentEqualsTo(therapyEvent2))
|
assertThat(therapyEvent.contentEqualsTo(therapyEvent2)).isTrue()
|
||||||
Assertions.assertTrue(therapyEvent.interfaceIdsEqualsTo(therapyEvent2))
|
assertThat(therapyEvent.interfaceIdsEqualsTo(therapyEvent2)).isTrue()
|
||||||
|
|
||||||
|
|
||||||
therapyEvent = TherapyEvent(
|
therapyEvent = TherapyEvent(
|
||||||
|
@ -55,8 +55,8 @@ internal class TherapyEventExtensionKtTest : TestBaseWithProfile() {
|
||||||
)
|
)
|
||||||
|
|
||||||
therapyEvent2 = (therapyEvent.toNSTherapyEvent().convertToRemoteAndBack() as NSTherapyEvent).toTherapyEvent()
|
therapyEvent2 = (therapyEvent.toNSTherapyEvent().convertToRemoteAndBack() as NSTherapyEvent).toTherapyEvent()
|
||||||
Assertions.assertTrue(therapyEvent.contentEqualsTo(therapyEvent2))
|
assertThat(therapyEvent.contentEqualsTo(therapyEvent2)).isTrue()
|
||||||
Assertions.assertTrue(therapyEvent.interfaceIdsEqualsTo(therapyEvent2))
|
assertThat(therapyEvent.interfaceIdsEqualsTo(therapyEvent2)).isTrue()
|
||||||
|
|
||||||
therapyEvent = TherapyEvent(
|
therapyEvent = TherapyEvent(
|
||||||
timestamp = 10000,
|
timestamp = 10000,
|
||||||
|
@ -77,7 +77,7 @@ internal class TherapyEventExtensionKtTest : TestBaseWithProfile() {
|
||||||
)
|
)
|
||||||
|
|
||||||
therapyEvent2 = (therapyEvent.toNSTherapyEvent().convertToRemoteAndBack() as NSTherapyEvent).toTherapyEvent()
|
therapyEvent2 = (therapyEvent.toNSTherapyEvent().convertToRemoteAndBack() as NSTherapyEvent).toTherapyEvent()
|
||||||
Assertions.assertTrue(therapyEvent.contentEqualsTo(therapyEvent2))
|
assertThat(therapyEvent.contentEqualsTo(therapyEvent2)).isTrue()
|
||||||
Assertions.assertTrue(therapyEvent.interfaceIdsEqualsTo(therapyEvent2))
|
assertThat(therapyEvent.interfaceIdsEqualsTo(therapyEvent2)).isTrue()
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue