core -> core-main
This commit is contained in:
parent
efd4d43a50
commit
6cc67e52a4
|
@ -7,9 +7,9 @@ plugins {
|
||||||
id 'kotlinx-serialization'
|
id 'kotlinx-serialization'
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/android_dependencies.gradle"
|
apply from: "${project.rootDir}/core/core-main/android_dependencies.gradle"
|
||||||
apply from: "${project.rootDir}/core/android_module_dependencies.gradle"
|
apply from: "${project.rootDir}/core/core-main/android_module_dependencies.gradle"
|
||||||
apply from: "${project.rootDir}/core/jacoco_global.gradle"
|
apply from: "${project.rootDir}/core/core-main/jacoco_global.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@ plugins {
|
||||||
id 'kotlinx-serialization'
|
id 'kotlinx-serialization'
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/android_dependencies.gradle"
|
apply from: "${project.rootDir}/core/core-main/android_dependencies.gradle"
|
||||||
apply from: "${project.rootDir}/core/android_module_dependencies.gradle"
|
apply from: "${project.rootDir}/core/core-main/android_module_dependencies.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
|
|
|
@ -7,11 +7,11 @@ plugins {
|
||||||
id 'com.hiya.jacoco-android'
|
id 'com.hiya.jacoco-android'
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/android_dependencies.gradle"
|
apply from: "${project.rootDir}/core/core-main/android_dependencies.gradle"
|
||||||
apply from: "${project.rootDir}/core/android_module_dependencies.gradle"
|
apply from: "${project.rootDir}/core/core-main/android_module_dependencies.gradle"
|
||||||
apply from: "${project.rootDir}/core/allopen_dependencies.gradle"
|
apply from: "${project.rootDir}/core/core-main/allopen_dependencies.gradle"
|
||||||
apply from: "${project.rootDir}/core/test_dependencies.gradle"
|
apply from: "${project.rootDir}/core/core-main/test_dependencies.gradle"
|
||||||
apply from: "${project.rootDir}/core/jacoco_global.gradle"
|
apply from: "${project.rootDir}/core/core-main/jacoco_global.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,8 @@ plugins {
|
||||||
id 'com.google.firebase.crashlytics'
|
id 'com.google.firebase.crashlytics'
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/android_dependencies.gradle"
|
apply from: "${project.rootDir}/core/core-main/android_dependencies.gradle"
|
||||||
apply from: "${project.rootDir}/core/jacoco_global.gradle"
|
apply from: "${project.rootDir}/core/core-main/jacoco_global.gradle"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
@ -185,7 +185,7 @@ dependencies {
|
||||||
implementation project(':app-wear-shared:rx')
|
implementation project(':app-wear-shared:rx')
|
||||||
implementation project(':app-wear-shared:shared')
|
implementation project(':app-wear-shared:shared')
|
||||||
implementation project(':app-wear-shared:shared-impl')
|
implementation project(':app-wear-shared:shared-impl')
|
||||||
implementation project(':core')
|
implementation project(':core:core-main')
|
||||||
implementation project(':interfaces')
|
implementation project(':interfaces')
|
||||||
implementation project(':ui')
|
implementation project(':ui')
|
||||||
implementation project(':plugins')
|
implementation project(':plugins')
|
||||||
|
@ -227,7 +227,7 @@ dependencies {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/test_dependencies.gradle"
|
apply from: "${project.rootDir}/core/core-main/test_dependencies.gradle"
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -130,7 +130,7 @@ class MainApp : DaggerApplication() {
|
||||||
InsertIfNewByTimestampTherapyEventTransaction(
|
InsertIfNewByTimestampTherapyEventTransaction(
|
||||||
timestamp = dateUtil.now(),
|
timestamp = dateUtil.now(),
|
||||||
type = TherapyEvent.Type.NOTE,
|
type = TherapyEvent.Type.NOTE,
|
||||||
note = rh.get().gs(info.nightscout.androidaps.core.R.string.androidaps_start) + " - " + Build.MANUFACTURER + " " + Build.MODEL,
|
note = rh.get().gs(info.nightscout.core.main.R.string.androidaps_start) + " - " + Build.MANUFACTURER + " " + Build.MODEL,
|
||||||
glucoseUnit = TherapyEvent.GlucoseUnit.MGDL
|
glucoseUnit = TherapyEvent.GlucoseUnit.MGDL
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
@ -6,8 +6,8 @@ import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import dagger.android.support.DaggerDialogFragment
|
import dagger.android.support.DaggerDialogFragment
|
||||||
import info.nightscout.androidaps.core.R
|
import info.nightscout.core.main.R
|
||||||
import info.nightscout.androidaps.core.databinding.DialogBolusprogressBinding
|
import info.nightscout.core.main.databinding.DialogBolusprogressBinding
|
||||||
import info.nightscout.shared.interfaces.ResourceHelper
|
import info.nightscout.shared.interfaces.ResourceHelper
|
||||||
import info.nightscout.androidaps.utils.FabricPrivacy
|
import info.nightscout.androidaps.utils.FabricPrivacy
|
||||||
import info.nightscout.rx.AapsSchedulers
|
import info.nightscout.rx.AapsSchedulers
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package info.nightscout.androidaps.plugins.configBuilder
|
package info.nightscout.androidaps.plugins.configBuilder
|
||||||
|
|
||||||
import info.nightscout.androidaps.core.R
|
import info.nightscout.core.main.R
|
||||||
import info.nightscout.androidaps.data.ProfileSealed
|
import info.nightscout.androidaps.data.ProfileSealed
|
||||||
import info.nightscout.androidaps.database.AppRepository
|
import info.nightscout.androidaps.database.AppRepository
|
||||||
import info.nightscout.androidaps.database.ValueWrapper
|
import info.nightscout.androidaps.database.ValueWrapper
|
||||||
|
|
|
@ -9,7 +9,7 @@ import android.content.Intent
|
||||||
import androidx.core.app.NotificationCompat
|
import androidx.core.app.NotificationCompat
|
||||||
import androidx.core.app.TaskStackBuilder
|
import androidx.core.app.TaskStackBuilder
|
||||||
import info.nightscout.androidaps.MainActivity
|
import info.nightscout.androidaps.MainActivity
|
||||||
import info.nightscout.androidaps.core.R
|
import info.nightscout.core.main.R
|
||||||
import info.nightscout.interfaces.IconsProvider
|
import info.nightscout.interfaces.IconsProvider
|
||||||
import info.nightscout.interfaces.NotificationHolder
|
import info.nightscout.interfaces.NotificationHolder
|
||||||
import info.nightscout.shared.interfaces.ResourceHelper
|
import info.nightscout.shared.interfaces.ResourceHelper
|
||||||
|
|
|
@ -6,11 +6,11 @@ plugins {
|
||||||
id 'com.hiya.jacoco-android'
|
id 'com.hiya.jacoco-android'
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/android_dependencies.gradle"
|
apply from: "${project.rootDir}/core/core-main/android_dependencies.gradle"
|
||||||
apply from: "${project.rootDir}/core/android_module_dependencies.gradle"
|
apply from: "${project.rootDir}/core/core-main/android_module_dependencies.gradle"
|
||||||
apply from: "${project.rootDir}/core/allopen_dependencies.gradle"
|
apply from: "${project.rootDir}/core/core-main/allopen_dependencies.gradle"
|
||||||
apply from: "${project.rootDir}/core/test_dependencies.gradle"
|
apply from: "${project.rootDir}/core/core-main/test_dependencies.gradle"
|
||||||
apply from: "${project.rootDir}/core/jacoco_global.gradle"
|
apply from: "${project.rootDir}/core/core-main/jacoco_global.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace 'info.nightscout.automation'
|
namespace 'info.nightscout.automation'
|
||||||
|
@ -18,7 +18,7 @@ android {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation project(':graphview')
|
implementation project(':graphview')
|
||||||
implementation project(':core')
|
implementation project(':core:core-main')
|
||||||
implementation project(':database')
|
implementation project(':database')
|
||||||
implementation project(':app-wear-shared:rx')
|
implementation project(':app-wear-shared:rx')
|
||||||
implementation project(':app-wear-shared:shared')
|
implementation project(':app-wear-shared:shared')
|
||||||
|
|
|
@ -45,15 +45,15 @@ class ActionAlarmTest : TestBase() {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
fun setup() {
|
fun setup() {
|
||||||
`when`(rh.gs(info.nightscout.androidaps.core.R.string.ok)).thenReturn("OK")
|
`when`(rh.gs(info.nightscout.core.main.R.string.ok)).thenReturn("OK")
|
||||||
`when`(rh.gs(info.nightscout.androidaps.core.R.string.alarm)).thenReturn("Alarm")
|
`when`(rh.gs(info.nightscout.core.main.R.string.alarm)).thenReturn("Alarm")
|
||||||
`when`(rh.gs(ArgumentMatchers.eq(R.string.alarm_message), ArgumentMatchers.anyString())).thenReturn("Alarm: %s")
|
`when`(rh.gs(ArgumentMatchers.eq(R.string.alarm_message), ArgumentMatchers.anyString())).thenReturn("Alarm: %s")
|
||||||
|
|
||||||
sut = ActionAlarm(injector)
|
sut = ActionAlarm(injector)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun friendlyNameTest() {
|
@Test fun friendlyNameTest() {
|
||||||
Assert.assertEquals(info.nightscout.androidaps.core.R.string.alarm, sut.friendlyName())
|
Assert.assertEquals(info.nightscout.core.main.R.string.alarm, sut.friendlyName())
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun shortDescriptionTest() {
|
@Test fun shortDescriptionTest() {
|
||||||
|
@ -62,7 +62,7 @@ class ActionAlarmTest : TestBase() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun iconTest() {
|
@Test fun iconTest() {
|
||||||
Assert.assertEquals(info.nightscout.androidaps.core.R.drawable.ic_access_alarm_24dp, sut.icon())
|
Assert.assertEquals(info.nightscout.core.main.R.drawable.ic_access_alarm_24dp, sut.icon())
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun doActionTest() {
|
@Test fun doActionTest() {
|
||||||
|
|
|
@ -23,7 +23,7 @@ class ActionCarePortalEventTest : ActionsTestBase() {
|
||||||
`when`(sp.getString(ArgumentMatchers.anyString(), ArgumentMatchers.anyString())).thenReturn("AAPS")
|
`when`(sp.getString(ArgumentMatchers.anyString(), ArgumentMatchers.anyString())).thenReturn("AAPS")
|
||||||
`when`(
|
`when`(
|
||||||
rh.gs(
|
rh.gs(
|
||||||
ArgumentMatchers.eq(info.nightscout.androidaps.core.R.string.careportal_note_message),
|
ArgumentMatchers.eq(info.nightscout.core.main.R.string.careportal_note_message),
|
||||||
ArgumentMatchers.anyString()
|
ArgumentMatchers.anyString()
|
||||||
)
|
)
|
||||||
).thenReturn("Note : %s")
|
).thenReturn("Note : %s")
|
||||||
|
@ -40,7 +40,7 @@ class ActionCarePortalEventTest : ActionsTestBase() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun friendlyNameTest() {
|
@Test fun friendlyNameTest() {
|
||||||
Assert.assertEquals(info.nightscout.androidaps.core.R.string.careportal, sut.friendlyName())
|
Assert.assertEquals(info.nightscout.core.main.R.string.careportal, sut.friendlyName())
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun shortDescriptionTest() {
|
@Test fun shortDescriptionTest() {
|
||||||
|
@ -48,7 +48,7 @@ class ActionCarePortalEventTest : ActionsTestBase() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun iconTest() {
|
@Test fun iconTest() {
|
||||||
Assert.assertEquals(info.nightscout.androidaps.core.R.drawable.ic_cp_note, sut.icon())
|
Assert.assertEquals(info.nightscout.core.main.R.drawable.ic_cp_note, sut.icon())
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun doActionTest() {
|
@Test fun doActionTest() {
|
||||||
|
|
|
@ -18,7 +18,7 @@ class ActionLoopDisableTest : ActionsTestBase() {
|
||||||
fun setup() {
|
fun setup() {
|
||||||
|
|
||||||
testPumpPlugin.pumpDescription.isTempBasalCapable = true
|
testPumpPlugin.pumpDescription.isTempBasalCapable = true
|
||||||
`when`(rh.gs(info.nightscout.androidaps.core.R.string.disableloop)).thenReturn("Disable loop")
|
`when`(rh.gs(info.nightscout.core.main.R.string.disableloop)).thenReturn("Disable loop")
|
||||||
`when`(rh.gs(R.string.alreadydisabled)).thenReturn("Disable loop")
|
`when`(rh.gs(R.string.alreadydisabled)).thenReturn("Disable loop")
|
||||||
|
|
||||||
sut = ActionLoopDisable(injector)
|
sut = ActionLoopDisable(injector)
|
||||||
|
@ -26,7 +26,7 @@ class ActionLoopDisableTest : ActionsTestBase() {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun friendlyNameTest() {
|
fun friendlyNameTest() {
|
||||||
Assert.assertEquals(info.nightscout.androidaps.core.R.string.disableloop, sut.friendlyName())
|
Assert.assertEquals(info.nightscout.core.main.R.string.disableloop, sut.friendlyName())
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -17,14 +17,14 @@ class ActionLoopEnableTest : ActionsTestBase() {
|
||||||
fun setup() {
|
fun setup() {
|
||||||
|
|
||||||
testPumpPlugin.pumpDescription.isTempBasalCapable = true
|
testPumpPlugin.pumpDescription.isTempBasalCapable = true
|
||||||
`when`(rh.gs(info.nightscout.androidaps.core.R.string.enableloop)).thenReturn("Enable loop")
|
`when`(rh.gs(info.nightscout.core.main.R.string.enableloop)).thenReturn("Enable loop")
|
||||||
`when`(rh.gs(R.string.alreadyenabled)).thenReturn("Already enabled")
|
`when`(rh.gs(R.string.alreadyenabled)).thenReturn("Already enabled")
|
||||||
|
|
||||||
sut = ActionLoopEnable(injector)
|
sut = ActionLoopEnable(injector)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun friendlyNameTest() {
|
@Test fun friendlyNameTest() {
|
||||||
Assert.assertEquals(info.nightscout.androidaps.core.R.string.enableloop, sut.friendlyName())
|
Assert.assertEquals(info.nightscout.core.main.R.string.enableloop, sut.friendlyName())
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun shortDescriptionTest() {
|
@Test fun shortDescriptionTest() {
|
||||||
|
|
|
@ -18,14 +18,14 @@ class ActionLoopResumeTest : ActionsTestBase() {
|
||||||
@Before
|
@Before
|
||||||
fun setup() {
|
fun setup() {
|
||||||
|
|
||||||
`when`(rh.gs(info.nightscout.androidaps.core.R.string.resumeloop)).thenReturn("Resume loop")
|
`when`(rh.gs(info.nightscout.core.main.R.string.resumeloop)).thenReturn("Resume loop")
|
||||||
`when`(rh.gs(R.string.notsuspended)).thenReturn("Not suspended")
|
`when`(rh.gs(R.string.notsuspended)).thenReturn("Not suspended")
|
||||||
|
|
||||||
sut = ActionLoopResume(injector)
|
sut = ActionLoopResume(injector)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun friendlyNameTest() {
|
@Test fun friendlyNameTest() {
|
||||||
Assert.assertEquals(info.nightscout.androidaps.core.R.string.resumeloop, sut.friendlyName())
|
Assert.assertEquals(info.nightscout.core.main.R.string.resumeloop, sut.friendlyName())
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun shortDescriptionTest() {
|
@Test fun shortDescriptionTest() {
|
||||||
|
|
|
@ -17,7 +17,7 @@ class ActionLoopSuspendTest : ActionsTestBase() {
|
||||||
@Before
|
@Before
|
||||||
fun setup() {
|
fun setup() {
|
||||||
|
|
||||||
`when`(rh.gs(info.nightscout.androidaps.core.R.string.suspendloop)).thenReturn("Suspend loop")
|
`when`(rh.gs(info.nightscout.core.main.R.string.suspendloop)).thenReturn("Suspend loop")
|
||||||
`when`(rh.gs(ArgumentMatchers.eq(R.string.suspendloopforXmin), ArgumentMatchers.anyInt())).thenReturn("Suspend loop for %d min")
|
`when`(rh.gs(ArgumentMatchers.eq(R.string.suspendloopforXmin), ArgumentMatchers.anyInt())).thenReturn("Suspend loop for %d min")
|
||||||
`when`(rh.gs(R.string.alreadysuspended)).thenReturn("Already suspended")
|
`when`(rh.gs(R.string.alreadysuspended)).thenReturn("Already suspended")
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ class ActionLoopSuspendTest : ActionsTestBase() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun friendlyNameTest() {
|
@Test fun friendlyNameTest() {
|
||||||
Assert.assertEquals(info.nightscout.androidaps.core.R.string.suspendloop, sut.friendlyName())
|
Assert.assertEquals(info.nightscout.core.main.R.string.suspendloop, sut.friendlyName())
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun shortDescriptionTest() {
|
@Test fun shortDescriptionTest() {
|
||||||
|
|
|
@ -43,8 +43,8 @@ class ActionNotificationTest : TestBase() {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
fun setup() {
|
fun setup() {
|
||||||
`when`(rh.gs(info.nightscout.androidaps.core.R.string.ok)).thenReturn("OK")
|
`when`(rh.gs(info.nightscout.core.main.R.string.ok)).thenReturn("OK")
|
||||||
`when`(rh.gs(info.nightscout.androidaps.core.R.string.notification)).thenReturn("Notification")
|
`when`(rh.gs(info.nightscout.core.main.R.string.notification)).thenReturn("Notification")
|
||||||
`when`(
|
`when`(
|
||||||
rh.gs(
|
rh.gs(
|
||||||
ArgumentMatchers.eq(R.string.notification_message),
|
ArgumentMatchers.eq(R.string.notification_message),
|
||||||
|
@ -58,7 +58,7 @@ class ActionNotificationTest : TestBase() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun friendlyNameTest() {
|
@Test fun friendlyNameTest() {
|
||||||
Assert.assertEquals(info.nightscout.androidaps.core.R.string.notification, sut.friendlyName())
|
Assert.assertEquals(info.nightscout.core.main.R.string.notification, sut.friendlyName())
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun shortDescriptionTest() {
|
@Test fun shortDescriptionTest() {
|
||||||
|
|
|
@ -18,7 +18,7 @@ class ActionProfileSwitchPercentTest : ActionsTestBase() {
|
||||||
fun setup() {
|
fun setup() {
|
||||||
|
|
||||||
`when`(rh.gs(R.string.startprofileforever)).thenReturn("Start profile %d%%")
|
`when`(rh.gs(R.string.startprofileforever)).thenReturn("Start profile %d%%")
|
||||||
`when`(rh.gs(info.nightscout.androidaps.core.R.string.startprofile)).thenReturn("Start profile %d%% for %d min")
|
`when`(rh.gs(info.nightscout.core.main.R.string.startprofile)).thenReturn("Start profile %d%% for %d min")
|
||||||
|
|
||||||
sut = ActionProfileSwitchPercent(injector)
|
sut = ActionProfileSwitchPercent(injector)
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ class ActionProfileSwitchPercentTest : ActionsTestBase() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun iconTest() {
|
@Test fun iconTest() {
|
||||||
Assert.assertEquals(info.nightscout.androidaps.core.R.drawable.ic_actions_profileswitch, sut.icon())
|
Assert.assertEquals(info.nightscout.core.main.R.drawable.ic_actions_profileswitch, sut.icon())
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun doActionTest() {
|
@Test fun doActionTest() {
|
||||||
|
|
|
@ -23,9 +23,9 @@ class ActionProfileSwitchTest : ActionsTestBase() {
|
||||||
`when`(rh.gs(R.string.profilename)).thenReturn("Change profile to")
|
`when`(rh.gs(R.string.profilename)).thenReturn("Change profile to")
|
||||||
`when`(rh.gs(ArgumentMatchers.eq(R.string.changengetoprofilename), ArgumentMatchers.anyString())).thenReturn("Change profile to %s")
|
`when`(rh.gs(ArgumentMatchers.eq(R.string.changengetoprofilename), ArgumentMatchers.anyString())).thenReturn("Change profile to %s")
|
||||||
`when`(rh.gs(R.string.alreadyset)).thenReturn("Already set")
|
`when`(rh.gs(R.string.alreadyset)).thenReturn("Already set")
|
||||||
`when`(rh.gs(info.nightscout.androidaps.core.R.string.notexists)).thenReturn("not exists")
|
`when`(rh.gs(info.nightscout.core.main.R.string.notexists)).thenReturn("not exists")
|
||||||
`when`(rh.gs(info.nightscout.androidaps.core.R.string.error_field_must_not_be_empty)).thenReturn("The field must not be empty")
|
`when`(rh.gs(info.nightscout.core.main.R.string.error_field_must_not_be_empty)).thenReturn("The field must not be empty")
|
||||||
`when`(rh.gs(info.nightscout.androidaps.core.R.string.noprofile)).thenReturn("No profile loaded from NS yet")
|
`when`(rh.gs(info.nightscout.core.main.R.string.noprofile)).thenReturn("No profile loaded from NS yet")
|
||||||
|
|
||||||
sut = ActionProfileSwitch(injector)
|
sut = ActionProfileSwitch(injector)
|
||||||
}
|
}
|
||||||
|
@ -107,6 +107,6 @@ class ActionProfileSwitchTest : ActionsTestBase() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun iconTest() {
|
@Test fun iconTest() {
|
||||||
Assert.assertEquals(info.nightscout.androidaps.core.R.drawable.ic_actions_profileswitch, sut.icon())
|
Assert.assertEquals(info.nightscout.core.main.R.drawable.ic_actions_profileswitch, sut.icon())
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -38,7 +38,7 @@ class ActionStartTempTargetTest : ActionsTestBase() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun iconTest() {
|
@Test fun iconTest() {
|
||||||
Assert.assertEquals(info.nightscout.androidaps.core.R.drawable.ic_temptarget_high, sut.icon())
|
Assert.assertEquals(info.nightscout.core.main.R.drawable.ic_temptarget_high, sut.icon())
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun doActionTest() {
|
@Test fun doActionTest() {
|
||||||
|
|
|
@ -180,7 +180,7 @@ ActionsTestBase : TestBaseWithProfile() {
|
||||||
`when`(activePlugin.activeProfileSource).thenReturn(profilePlugin)
|
`when`(activePlugin.activeProfileSource).thenReturn(profilePlugin)
|
||||||
`when`(profilePlugin.profile).thenReturn(getValidProfileStore())
|
`when`(profilePlugin.profile).thenReturn(getValidProfileStore())
|
||||||
|
|
||||||
`when`(rh.gs(info.nightscout.androidaps.core.R.string.ok)).thenReturn("OK")
|
`when`(rh.gs(info.nightscout.core.main.R.string.ok)).thenReturn("OK")
|
||||||
`when`(rh.gs(info.nightscout.androidaps.core.R.string.error)).thenReturn("Error")
|
`when`(rh.gs(info.nightscout.core.main.R.string.error)).thenReturn("Error")
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -11,8 +11,8 @@ class StaticLabelTest : TriggerTestBase() {
|
||||||
@Test fun constructor() {
|
@Test fun constructor() {
|
||||||
var sl = StaticLabel(rh, "any", TriggerDummy(injector))
|
var sl = StaticLabel(rh, "any", TriggerDummy(injector))
|
||||||
Assert.assertEquals("any", sl.label)
|
Assert.assertEquals("any", sl.label)
|
||||||
`when`(rh.gs(info.nightscout.androidaps.core.R.string.pumplimit)).thenReturn("pump limit")
|
`when`(rh.gs(info.nightscout.core.main.R.string.pumplimit)).thenReturn("pump limit")
|
||||||
sl = StaticLabel(rh, info.nightscout.androidaps.core.R.string.pumplimit, TriggerDummy(injector))
|
sl = StaticLabel(rh, info.nightscout.core.main.R.string.pumplimit, TriggerDummy(injector))
|
||||||
Assert.assertEquals("pump limit", sl.label)
|
Assert.assertEquals("pump limit", sl.label)
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -16,8 +16,8 @@ class TriggerAutosensValueTest : TriggerTestBase() {
|
||||||
|
|
||||||
var now = 1514766900000L
|
var now = 1514766900000L
|
||||||
@Test fun shouldRunTest() {
|
@Test fun shouldRunTest() {
|
||||||
`when`(sp.getDouble(Mockito.eq(info.nightscout.androidaps.core.R.string.key_openapsama_autosens_max), ArgumentMatchers.anyDouble())).thenReturn(1.2)
|
`when`(sp.getDouble(Mockito.eq(info.nightscout.core.main.R.string.key_openapsama_autosens_max), ArgumentMatchers.anyDouble())).thenReturn(1.2)
|
||||||
`when`(sp.getDouble(Mockito.eq(info.nightscout.androidaps.core.R.string.key_openapsama_autosens_min), ArgumentMatchers.anyDouble())).thenReturn(0.7)
|
`when`(sp.getDouble(Mockito.eq(info.nightscout.core.main.R.string.key_openapsama_autosens_min), ArgumentMatchers.anyDouble())).thenReturn(0.7)
|
||||||
`when`(autosensDataStore.getLastAutosensData(anyObject(), anyObject(), anyObject())).thenReturn(generateAutosensData())
|
`when`(autosensDataStore.getLastAutosensData(anyObject(), anyObject(), anyObject())).thenReturn(generateAutosensData())
|
||||||
var t = TriggerAutosensValue(injector)
|
var t = TriggerAutosensValue(injector)
|
||||||
t.autosens.value = 110.0
|
t.autosens.value = 110.0
|
||||||
|
|
|
@ -33,7 +33,7 @@ class TriggerBTDeviceTest : TriggerTestBase() {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun icon() {
|
fun icon() {
|
||||||
Assert.assertEquals(Optional.of(info.nightscout.androidaps.core.R.drawable.ic_bluetooth_white_48dp), TriggerBTDevice(injector).icon())
|
Assert.assertEquals(Optional.of(info.nightscout.core.main.R.drawable.ic_bluetooth_white_48dp), TriggerBTDevice(injector).icon())
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun duplicate() {
|
@Test fun duplicate() {
|
||||||
|
|
|
@ -76,7 +76,7 @@ class TriggerBgTest : TriggerTestBase() {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun iconTest() {
|
fun iconTest() {
|
||||||
Assert.assertEquals(Optional.of(info.nightscout.androidaps.core.R.drawable.ic_cp_bgcheck), TriggerBg(injector).icon())
|
Assert.assertEquals(Optional.of(info.nightscout.core.main.R.drawable.ic_cp_bgcheck), TriggerBg(injector).icon())
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun generateOneCurrentRecordBgData(): List<GlucoseValue> {
|
private fun generateOneCurrentRecordBgData(): List<GlucoseValue> {
|
||||||
|
|
|
@ -94,6 +94,6 @@ class TriggerBolusAgoTest : TriggerTestBase() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun iconTest() {
|
@Test fun iconTest() {
|
||||||
Assert.assertEquals(Optional.of(info.nightscout.androidaps.core.R.drawable.ic_bolus), TriggerBolusAgo(injector).icon())
|
Assert.assertEquals(Optional.of(info.nightscout.core.main.R.drawable.ic_bolus), TriggerBolusAgo(injector).icon())
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -61,7 +61,7 @@ class TriggerCOBTest : TriggerTestBase() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun iconTest() {
|
@Test fun iconTest() {
|
||||||
Assert.assertEquals(Optional.of(info.nightscout.androidaps.core.R.drawable.ic_cp_bolus_carbs), TriggerCOB(injector).icon())
|
Assert.assertEquals(Optional.of(info.nightscout.core.main.R.drawable.ic_cp_bolus_carbs), TriggerCOB(injector).icon())
|
||||||
}
|
}
|
||||||
|
|
||||||
fun generateCobInfo(): CobInfo {
|
fun generateCobInfo(): CobInfo {
|
||||||
|
|
|
@ -60,7 +60,7 @@ class TriggerProfilePercentTest : TriggerTestBase() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun iconTest() {
|
@Test fun iconTest() {
|
||||||
Assert.assertEquals(Optional.of(info.nightscout.androidaps.core.R.drawable.ic_actions_profileswitch), TriggerProfilePercent(injector).icon())
|
Assert.assertEquals(Optional.of(info.nightscout.core.main.R.drawable.ic_actions_profileswitch), TriggerProfilePercent(injector).icon())
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun friendlyNameTest() {
|
@Test fun friendlyNameTest() {
|
||||||
|
|
|
@ -61,7 +61,7 @@ class TriggerPumpLastConnectionTest : TriggerTestBase() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun iconTest() {
|
@Test fun iconTest() {
|
||||||
Assert.assertEquals(Optional.of(info.nightscout.androidaps.core.R.drawable.ic_remove), TriggerPumpLastConnection(injector).icon())
|
Assert.assertEquals(Optional.of(info.nightscout.core.main.R.drawable.ic_remove), TriggerPumpLastConnection(injector).icon())
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun friendlyNameTest() {
|
@Test fun friendlyNameTest() {
|
||||||
|
|
|
@ -65,6 +65,6 @@ class TriggerTimeRangeTest : TriggerTestBase() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun iconTest() {
|
@Test fun iconTest() {
|
||||||
Assert.assertEquals(Optional.of(info.nightscout.androidaps.core.R.drawable.ic_access_alarm_24dp), TriggerTimeRange(injector).icon())
|
Assert.assertEquals(Optional.of(info.nightscout.core.main.R.drawable.ic_access_alarm_24dp), TriggerTimeRange(injector).icon())
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -48,7 +48,7 @@ class TriggerTimeTest : TriggerTestBase() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun friendlyNameTest() {
|
@Test fun friendlyNameTest() {
|
||||||
Assert.assertEquals(info.nightscout.androidaps.core.R.string.time, TriggerTime(injector).friendlyName())
|
Assert.assertEquals(info.nightscout.core.main.R.string.time, TriggerTime(injector).friendlyName())
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun friendlyDescriptionTest() {
|
@Test fun friendlyDescriptionTest() {
|
||||||
|
@ -56,6 +56,6 @@ class TriggerTimeTest : TriggerTestBase() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun iconTest() {
|
@Test fun iconTest() {
|
||||||
Assert.assertEquals(Optional.of(info.nightscout.androidaps.core.R.drawable.ic_access_alarm_24dp), TriggerTime(injector).icon())
|
Assert.assertEquals(Optional.of(info.nightscout.core.main.R.drawable.ic_access_alarm_24dp), TriggerTime(injector).icon())
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -65,7 +65,7 @@ class TriggerWifiSsidTest : TriggerTestBase() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun friendlyNameTest() {
|
@Test fun friendlyNameTest() {
|
||||||
Assert.assertEquals(info.nightscout.androidaps.core.R.string.ns_wifi_ssids, TriggerWifiSsid(injector).friendlyName())
|
Assert.assertEquals(info.nightscout.core.main.R.string.ns_wifi_ssids, TriggerWifiSsid(injector).friendlyName())
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun friendlyDescriptionTest() {
|
@Test fun friendlyDescriptionTest() {
|
||||||
|
|
|
@ -7,11 +7,11 @@ plugins {
|
||||||
id 'com.hiya.jacoco-android'
|
id 'com.hiya.jacoco-android'
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "${project.rootDir}/core/android_dependencies.gradle"
|
apply from: "${project.rootDir}/core/core-main/android_dependencies.gradle"
|
||||||
apply from: "${project.rootDir}/core/android_module_dependencies.gradle"
|
apply from: "${project.rootDir}/core/core-main/android_module_dependencies.gradle"
|
||||||
apply from: "${project.rootDir}/core/allopen_dependencies.gradle"
|
apply from: "${project.rootDir}/core/core-main/allopen_dependencies.gradle"
|
||||||
apply from: "${project.rootDir}/core/test_dependencies.gradle"
|
apply from: "${project.rootDir}/core/core-main/test_dependencies.gradle"
|
||||||
apply from: "${project.rootDir}/core/jacoco_global.gradle"
|
apply from: "${project.rootDir}/core/core-main/jacoco_global.gradle"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation project(':graphview')
|
implementation project(':graphview')
|
||||||
|
@ -92,5 +92,5 @@ dependencies {
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace 'info.nightscout.androidaps.core'
|
namespace 'info.nightscout.core.main'
|
||||||
}
|
}
|
|
@ -5,7 +5,7 @@ import android.content.pm.PackageManager
|
||||||
import androidx.activity.result.contract.ActivityResultContracts
|
import androidx.activity.result.contract.ActivityResultContracts
|
||||||
import androidx.core.app.ActivityCompat
|
import androidx.core.app.ActivityCompat
|
||||||
import dagger.android.support.DaggerAppCompatActivity
|
import dagger.android.support.DaggerAppCompatActivity
|
||||||
import info.nightscout.androidaps.core.R
|
import info.nightscout.core.main.R
|
||||||
import info.nightscout.interfaces.ImportExportPrefs
|
import info.nightscout.interfaces.ImportExportPrefs
|
||||||
import info.nightscout.shared.interfaces.ResourceHelper
|
import info.nightscout.shared.interfaces.ResourceHelper
|
||||||
import info.nightscout.androidaps.plugins.general.maintenance.PrefsFileContract
|
import info.nightscout.androidaps.plugins.general.maintenance.PrefsFileContract
|
|
@ -1,7 +1,7 @@
|
||||||
package info.nightscout.androidaps.activities
|
package info.nightscout.androidaps.activities
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import info.nightscout.androidaps.core.R
|
import info.nightscout.core.main.R
|
||||||
import info.nightscout.interfaces.locale.LocaleHelper
|
import info.nightscout.interfaces.locale.LocaleHelper
|
||||||
import info.nightscout.rx.bus.RxBus
|
import info.nightscout.rx.bus.RxBus
|
||||||
import info.nightscout.rx.events.EventThemeSwitch
|
import info.nightscout.rx.events.EventThemeSwitch
|
|
@ -1,6 +1,6 @@
|
||||||
package info.nightscout.androidaps.data
|
package info.nightscout.androidaps.data
|
||||||
|
|
||||||
import info.nightscout.androidaps.core.R
|
import info.nightscout.core.main.R
|
||||||
import info.nightscout.androidaps.database.data.Block
|
import info.nightscout.androidaps.database.data.Block
|
||||||
import info.nightscout.androidaps.database.data.TargetBlock
|
import info.nightscout.androidaps.database.data.TargetBlock
|
||||||
import info.nightscout.androidaps.database.embedments.InsulinConfiguration
|
import info.nightscout.androidaps.database.embedments.InsulinConfiguration
|
|
@ -1,7 +1,7 @@
|
||||||
package info.nightscout.androidaps.data
|
package info.nightscout.androidaps.data
|
||||||
|
|
||||||
import dagger.android.HasAndroidInjector
|
import dagger.android.HasAndroidInjector
|
||||||
import info.nightscout.androidaps.core.R
|
import info.nightscout.core.main.R
|
||||||
import info.nightscout.shared.interfaces.ResourceHelper
|
import info.nightscout.shared.interfaces.ResourceHelper
|
||||||
import info.nightscout.androidaps.utils.DecimalFormatter
|
import info.nightscout.androidaps.utils.DecimalFormatter
|
||||||
import info.nightscout.interfaces.utils.Round
|
import info.nightscout.interfaces.utils.Round
|
|
@ -9,8 +9,8 @@ import android.view.Window
|
||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
import dagger.android.support.DaggerDialogFragment
|
import dagger.android.support.DaggerDialogFragment
|
||||||
import info.nightscout.androidaps.activities.DialogAppCompatActivity
|
import info.nightscout.androidaps.activities.DialogAppCompatActivity
|
||||||
import info.nightscout.androidaps.core.R
|
import info.nightscout.core.main.R
|
||||||
import info.nightscout.androidaps.core.databinding.DialogBolusprogressBinding
|
import info.nightscout.core.main.databinding.DialogBolusprogressBinding
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
import info.nightscout.androidaps.events.EventPumpStatusChanged
|
import info.nightscout.androidaps.events.EventPumpStatusChanged
|
|
@ -13,7 +13,7 @@ import com.google.android.material.datepicker.MaterialDatePicker
|
||||||
import com.google.android.material.timepicker.MaterialTimePicker
|
import com.google.android.material.timepicker.MaterialTimePicker
|
||||||
import com.google.android.material.timepicker.TimeFormat
|
import com.google.android.material.timepicker.TimeFormat
|
||||||
import dagger.android.support.DaggerDialogFragment
|
import dagger.android.support.DaggerDialogFragment
|
||||||
import info.nightscout.androidaps.core.R
|
import info.nightscout.core.main.R
|
||||||
import info.nightscout.shared.extensions.toVisibility
|
import info.nightscout.shared.extensions.toVisibility
|
||||||
import info.nightscout.shared.utils.DateUtil
|
import info.nightscout.shared.utils.DateUtil
|
||||||
import info.nightscout.rx.logging.AAPSLogger
|
import info.nightscout.rx.logging.AAPSLogger
|
|
@ -12,8 +12,8 @@ import android.view.Window
|
||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
import dagger.android.support.DaggerDialogFragment
|
import dagger.android.support.DaggerDialogFragment
|
||||||
import info.nightscout.androidaps.activities.DialogAppCompatActivity
|
import info.nightscout.androidaps.activities.DialogAppCompatActivity
|
||||||
import info.nightscout.androidaps.core.R
|
import info.nightscout.core.main.R
|
||||||
import info.nightscout.androidaps.core.databinding.DialogErrorBinding
|
import info.nightscout.core.main.databinding.DialogErrorBinding
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
|
@ -9,8 +9,8 @@ import android.view.Window
|
||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
import dagger.android.HasAndroidInjector
|
import dagger.android.HasAndroidInjector
|
||||||
import dagger.android.support.DaggerDialogFragment
|
import dagger.android.support.DaggerDialogFragment
|
||||||
import info.nightscout.androidaps.core.R
|
import info.nightscout.core.main.R
|
||||||
import info.nightscout.androidaps.core.databinding.DialogProfileviewerBinding
|
import info.nightscout.core.main.databinding.DialogProfileviewerBinding
|
||||||
import info.nightscout.androidaps.data.ProfileSealed
|
import info.nightscout.androidaps.data.ProfileSealed
|
||||||
import info.nightscout.androidaps.database.AppRepository
|
import info.nightscout.androidaps.database.AppRepository
|
||||||
import info.nightscout.androidaps.database.ValueWrapper
|
import info.nightscout.androidaps.database.ValueWrapper
|
|
@ -1,6 +1,6 @@
|
||||||
package info.nightscout.androidaps.events
|
package info.nightscout.androidaps.events
|
||||||
|
|
||||||
import info.nightscout.androidaps.core.R
|
import info.nightscout.core.main.R
|
||||||
import info.nightscout.shared.interfaces.ResourceHelper
|
import info.nightscout.shared.interfaces.ResourceHelper
|
||||||
|
|
||||||
class EventPumpStatusChanged : EventStatus {
|
class EventPumpStatusChanged : EventStatus {
|
|
@ -1,6 +1,6 @@
|
||||||
package info.nightscout.androidaps.extensions
|
package info.nightscout.androidaps.extensions
|
||||||
|
|
||||||
import info.nightscout.androidaps.core.R
|
import info.nightscout.core.main.R
|
||||||
import info.nightscout.androidaps.database.entities.TemporaryTarget
|
import info.nightscout.androidaps.database.entities.TemporaryTarget
|
||||||
import info.nightscout.interfaces.GlucoseUnit
|
import info.nightscout.interfaces.GlucoseUnit
|
||||||
import info.nightscout.androidaps.interfaces.Profile
|
import info.nightscout.androidaps.interfaces.Profile
|
|
@ -5,7 +5,7 @@ import android.content.Context
|
||||||
import android.view.Gravity
|
import android.view.Gravity
|
||||||
import android.widget.TableRow
|
import android.widget.TableRow
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import info.nightscout.androidaps.core.R
|
import info.nightscout.core.main.R
|
||||||
import info.nightscout.androidaps.database.entities.TotalDailyDose
|
import info.nightscout.androidaps.database.entities.TotalDailyDose
|
||||||
import info.nightscout.shared.utils.DateUtil
|
import info.nightscout.shared.utils.DateUtil
|
||||||
import info.nightscout.shared.interfaces.ResourceHelper
|
import info.nightscout.shared.interfaces.ResourceHelper
|
|
@ -1,6 +1,6 @@
|
||||||
package info.nightscout.androidaps.extensions
|
package info.nightscout.androidaps.extensions
|
||||||
|
|
||||||
import info.nightscout.androidaps.core.R
|
import info.nightscout.core.main.R
|
||||||
import info.nightscout.androidaps.database.entities.GlucoseValue
|
import info.nightscout.androidaps.database.entities.GlucoseValue
|
||||||
|
|
||||||
fun GlucoseValue.TrendArrow.directionToIcon(): Int {
|
fun GlucoseValue.TrendArrow.directionToIcon(): Int {
|
|
@ -1,6 +1,6 @@
|
||||||
package info.nightscout.androidaps.extensions
|
package info.nightscout.androidaps.extensions
|
||||||
|
|
||||||
import info.nightscout.androidaps.core.R
|
import info.nightscout.core.main.R
|
||||||
import info.nightscout.androidaps.database.entities.UserEntry.*
|
import info.nightscout.androidaps.database.entities.UserEntry.*
|
||||||
|
|
||||||
fun ColorGroup.colorId(): Int {
|
fun ColorGroup.colorId(): Int {
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue