Rewrites EffectiveProfileSwitchExtensionKtTest with matchers
Issue #2745
This commit is contained in:
parent
c691884759
commit
d8fe546c9f
|
@ -1,6 +1,7 @@
|
|||
package info.nightscout.plugins.sync.nsclientV3.extensions
|
||||
|
||||
import app.aaps.shared.tests.TestBaseWithProfile
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import info.nightscout.database.entities.EffectiveProfileSwitch
|
||||
import info.nightscout.database.entities.embedments.InsulinConfiguration
|
||||
import info.nightscout.database.entities.embedments.InterfaceIDs
|
||||
|
@ -8,7 +9,6 @@ import info.nightscout.interfaces.insulin.Insulin
|
|||
import info.nightscout.plugins.sync.nsclient.extensions.fromConstant
|
||||
import info.nightscout.sdk.localmodel.treatment.NSEffectiveProfileSwitch
|
||||
import info.nightscout.sdk.mapper.convertToRemoteAndBack
|
||||
import org.junit.jupiter.api.Assertions
|
||||
import org.junit.jupiter.api.BeforeEach
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.mockito.Mock
|
||||
|
@ -55,7 +55,7 @@ internal class EffectiveProfileSwitchExtensionKtTest : TestBaseWithProfile() {
|
|||
)
|
||||
|
||||
val profileSwitch2 = (profileSwitch.toNSEffectiveProfileSwitch(dateUtil).convertToRemoteAndBack() as NSEffectiveProfileSwitch).toEffectiveProfileSwitch(dateUtil)!!
|
||||
Assertions.assertTrue(profileSwitch.contentEqualsTo(profileSwitch2))
|
||||
Assertions.assertTrue(profileSwitch.interfaceIdsEqualsTo(profileSwitch2))
|
||||
assertThat(profileSwitch.contentEqualsTo(profileSwitch2)).isTrue()
|
||||
assertThat(profileSwitch.interfaceIdsEqualsTo(profileSwitch2)).isTrue()
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue