diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/virtual/VirtualPumpPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/virtual/VirtualPumpPlugin.kt index debd4e30ea..7d72e9deae 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/virtual/VirtualPumpPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/virtual/VirtualPumpPlugin.kt @@ -40,7 +40,7 @@ import javax.inject.Singleton import kotlin.math.min @Singleton -class VirtualPumpPlugin @Inject constructor( +open class VirtualPumpPlugin @Inject constructor( injector: HasAndroidInjector, aapsLogger: AAPSLogger, private val rxBus: RxBusWrapper, diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/aps/loop/LoopPluginTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/aps/loop/LoopPluginTest.kt index fc092046d2..32c37d1603 100644 --- a/app/src/test/java/info/nightscout/androidaps/plugins/aps/loop/LoopPluginTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/plugins/aps/loop/LoopPluginTest.kt @@ -27,16 +27,9 @@ import info.nightscout.androidaps.utils.sharedPreferences.SP import org.junit.Assert import org.junit.Before import org.junit.Test -import org.junit.runner.RunWith import org.mockito.Mock import org.mockito.Mockito.`when` -import org.powermock.core.classloader.annotations.PrepareForTest -import org.powermock.modules.junit4.PowerMockRunner -@RunWith(PowerMockRunner::class) -@PrepareForTest( - ConstraintChecker::class, VirtualPumpPlugin::class, FabricPrivacy::class, ReceiverStatusStore::class, - IobCobCalculatorPlugin::class, AppRepository::class) class LoopPluginTest : TestBase() { @Mock lateinit var sp: SP diff --git a/core/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ConstraintChecker.kt b/core/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ConstraintChecker.kt index 07b4f8f66b..0ceee93a06 100644 --- a/core/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ConstraintChecker.kt +++ b/core/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ConstraintChecker.kt @@ -10,7 +10,7 @@ import javax.inject.Inject import javax.inject.Singleton @Singleton -class ConstraintChecker @Inject constructor(private val activePlugin: ActivePluginProvider) : ConstraintsInterface { +open class ConstraintChecker @Inject constructor(private val activePlugin: ActivePluginProvider) : ConstraintsInterface { fun isLoopInvocationAllowed(): Constraint = isLoopInvocationAllowed(Constraint(true)) diff --git a/core/src/main/java/info/nightscout/androidaps/receivers/ReceiverStatusStore.kt b/core/src/main/java/info/nightscout/androidaps/receivers/ReceiverStatusStore.kt index 30090d386f..897360a01b 100644 --- a/core/src/main/java/info/nightscout/androidaps/receivers/ReceiverStatusStore.kt +++ b/core/src/main/java/info/nightscout/androidaps/receivers/ReceiverStatusStore.kt @@ -9,7 +9,7 @@ import javax.inject.Inject import javax.inject.Singleton @Singleton -class ReceiverStatusStore @Inject constructor(val context: Context, val rxBus: RxBusWrapper) { +open class ReceiverStatusStore @Inject constructor(val context: Context, val rxBus: RxBusWrapper) { var lastNetworkEvent: EventNetworkChange? = null diff --git a/core/src/main/java/info/nightscout/androidaps/utils/FabricPrivacy.kt b/core/src/main/java/info/nightscout/androidaps/utils/FabricPrivacy.kt index abad290b32..c956409fb2 100644 --- a/core/src/main/java/info/nightscout/androidaps/utils/FabricPrivacy.kt +++ b/core/src/main/java/info/nightscout/androidaps/utils/FabricPrivacy.kt @@ -18,7 +18,7 @@ import javax.inject.Singleton * emulates the methods but ignores the request if the instance is null or invalid. */ @Singleton -class FabricPrivacy @Inject constructor( +open class FabricPrivacy @Inject constructor( private val aapsLogger: AAPSLogger, private val sp: SP ) { diff --git a/database/src/main/java/info/nightscout/androidaps/database/AppRepository.kt b/database/src/main/java/info/nightscout/androidaps/database/AppRepository.kt index da47ce1d55..b7cc2f707c 100644 --- a/database/src/main/java/info/nightscout/androidaps/database/AppRepository.kt +++ b/database/src/main/java/info/nightscout/androidaps/database/AppRepository.kt @@ -18,7 +18,7 @@ import javax.inject.Inject import javax.inject.Singleton @Singleton -class AppRepository @Inject internal constructor( +open class AppRepository @Inject internal constructor( internal val database: AppDatabase ) {