Include dateUtil in test
This commit is contained in:
parent
d06d5f6b02
commit
73e4933251
2 changed files with 6 additions and 3 deletions
|
@ -56,10 +56,10 @@ class CRDatum {
|
|||
var isEqual = true
|
||||
if (crInitialIOB != obj.crInitialIOB) isEqual = false
|
||||
if (crInitialBG != obj.crInitialBG) isEqual = false
|
||||
//if (crInitialCarbTime / 1000 != obj.crInitialCarbTime / 1000) isEqual = false
|
||||
if (crInitialCarbTime / 1000 != obj.crInitialCarbTime / 1000) isEqual = false
|
||||
if (crEndIOB != obj.crEndIOB) isEqual = false
|
||||
if (crEndBG != obj.crEndBG) isEqual = false
|
||||
//if (crEndTime / 1000 != obj.crEndTime / 1000) isEqual = false
|
||||
if (crEndTime / 1000 != obj.crEndTime / 1000) isEqual = false
|
||||
if (crCarbs != obj.crCarbs) isEqual = false
|
||||
if (crInsulin != obj.crInsulin) isEqual = false
|
||||
return isEqual
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package info.nightscout.androidaps.plugins.general.autotune
|
||||
|
||||
import android.content.Context
|
||||
import info.nightscout.androidaps.TestBase
|
||||
import info.nightscout.androidaps.plugins.general.autotune.data.*
|
||||
import info.nightscout.androidaps.utils.DateUtil
|
||||
|
@ -11,12 +12,14 @@ import org.mockito.Mock
|
|||
import java.io.File
|
||||
|
||||
class PreppedGlucoseTest : TestBase() {
|
||||
@Mock lateinit var dateUtil: DateUtil
|
||||
@Mock lateinit var context: Context
|
||||
lateinit var dateUtil: DateUtil
|
||||
lateinit var prep1: PreppedGlucose
|
||||
lateinit var prepjson1: String
|
||||
|
||||
@Before
|
||||
fun initData() {
|
||||
dateUtil = DateUtil(context)
|
||||
prepjson1 = File("src/test/res/autotune/test1/autotune.2022-05-21.json").readText()
|
||||
prep1 = PreppedGlucose(JSONObject(prepjson1), dateUtil)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue