remove unused code
This commit is contained in:
parent
b12c8909ca
commit
10e8e32e3b
|
@ -7,7 +7,6 @@ import info.nightscout.core.pump.toHtml
|
||||||
import info.nightscout.interfaces.pump.PumpEnactResult
|
import info.nightscout.interfaces.pump.PumpEnactResult
|
||||||
import info.nightscout.plugins.aps.loop.extensions.json
|
import info.nightscout.plugins.aps.loop.extensions.json
|
||||||
import info.nightscout.pump.virtual.extensions.toText
|
import info.nightscout.pump.virtual.extensions.toText
|
||||||
import info.nightscout.plugins.sync.nsShared.extensions.log
|
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
import org.junit.jupiter.api.Assertions
|
import org.junit.jupiter.api.Assertions
|
||||||
import org.junit.jupiter.api.BeforeEach
|
import org.junit.jupiter.api.BeforeEach
|
||||||
|
@ -109,15 +108,6 @@ class PumpEnactResultTest : TestBaseWithProfile() {
|
||||||
Assertions.assertEquals(true, per.queued)
|
Assertions.assertEquals(true, per.queued)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun logTest() {
|
|
||||||
val per = PumpEnactResult(injector)
|
|
||||||
|
|
||||||
Assertions.assertEquals(
|
|
||||||
"Success: false Enacted: false Comment: Duration: -1 Absolute: -1.0 Percent: -1 IsPercent: false IsTempCancel: false bolusDelivered: 0.0 Queued: false",
|
|
||||||
per.log()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test fun toStringTest() {
|
@Test fun toStringTest() {
|
||||||
var per = PumpEnactResult(injector).enacted(true).bolusDelivered(10.0).comment("AAA")
|
var per = PumpEnactResult(injector).enacted(true).bolusDelivered(10.0).comment("AAA")
|
||||||
Assertions.assertEquals(
|
Assertions.assertEquals(
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
package info.nightscout.plugins.sync.nsShared.extensions
|
|
||||||
|
|
||||||
import info.nightscout.interfaces.pump.PumpEnactResult
|
|
||||||
import info.nightscout.interfaces.utils.Round
|
|
||||||
import org.json.JSONObject
|
|
||||||
|
|
||||||
fun PumpEnactResult.log(): String {
|
|
||||||
return "Success: " + success +
|
|
||||||
" Enacted: " + enacted +
|
|
||||||
" Comment: " + comment +
|
|
||||||
" Duration: " + duration +
|
|
||||||
" Absolute: " + absolute +
|
|
||||||
" Percent: " + percent +
|
|
||||||
" IsPercent: " + isPercent +
|
|
||||||
" IsTempCancel: " + isTempCancel +
|
|
||||||
" bolusDelivered: " + bolusDelivered +
|
|
||||||
" Queued: " + queued
|
|
||||||
}
|
|
Loading…
Reference in a new issue