merge with dev

This commit is contained in:
Andrei Vereha 2021-09-25 13:55:57 +02:00
commit 0cd9beb2cf
351 changed files with 1079 additions and 1705 deletions

View file

@ -186,10 +186,10 @@ class SafetyPlugin @Inject constructor(
override fun applyMaxIOBConstraints(maxIob: Constraint<Double>): Constraint<Double> {
val apsMode = sp.getString(R.string.key_aps_mode, "open")
val maxIobPref: Double = if (openAPSSMBPlugin.isEnabled(PluginType.APS)) sp.getDouble(R.string.key_openapssmb_max_iob, 3.0) else sp.getDouble(R.string.key_openapsma_max_iob, 1.5)
val maxIobPref: Double = if (openAPSSMBPlugin.isEnabled()) sp.getDouble(R.string.key_openapssmb_max_iob, 3.0) else sp.getDouble(R.string.key_openapsma_max_iob, 1.5)
maxIob.setIfSmaller(aapsLogger, maxIobPref, String.format(resourceHelper.gs(R.string.limitingiob), maxIobPref, resourceHelper.gs(R.string.maxvalueinpreferences)), this)
if (openAPSAMAPlugin.isEnabled(PluginType.APS)) maxIob.setIfSmaller(aapsLogger, hardLimits.maxIobAMA(), String.format(resourceHelper.gs(R.string.limitingiob), hardLimits.maxIobAMA(), resourceHelper.gs(R.string.hardlimit)), this)
if (openAPSSMBPlugin.isEnabled(PluginType.APS)) maxIob.setIfSmaller(aapsLogger, hardLimits.maxIobSMB(), String.format(resourceHelper.gs(R.string.limitingiob), hardLimits.maxIobSMB(), resourceHelper.gs(R.string.hardlimit)), this)
if (openAPSAMAPlugin.isEnabled()) maxIob.setIfSmaller(aapsLogger, hardLimits.maxIobAMA(), String.format(resourceHelper.gs(R.string.limitingiob), hardLimits.maxIobAMA(), resourceHelper.gs(R.string.hardlimit)), this)
if (openAPSSMBPlugin.isEnabled()) maxIob.setIfSmaller(aapsLogger, hardLimits.maxIobSMB(), String.format(resourceHelper.gs(R.string.limitingiob), hardLimits.maxIobSMB(), resourceHelper.gs(R.string.hardlimit)), this)
if (apsMode == "lgs") maxIob.setIfSmaller(aapsLogger, HardLimits.MAX_IOB_LGS, String.format(resourceHelper.gs(R.string.limitingiob), HardLimits.MAX_IOB_LGS, resourceHelper.gs(R.string.lowglucosesuspend)), this)
return maxIob
}

View file

@ -1,6 +1,7 @@
package info.nightscout.androidaps.plugins.general.maintenance
import ch.qos.logback.classic.LoggerContext
import info.nightscout.androidaps.annotations.OpenForTesting
import org.slf4j.LoggerFactory
import javax.inject.Inject
import javax.inject.Singleton
@ -8,6 +9,7 @@ import javax.inject.Singleton
/**
* This class provides several methods for log-handling (eg. sending logs as emails).
*/
@OpenForTesting
@Singleton
class LoggerUtils @Inject constructor() {

View file

@ -3,6 +3,7 @@ package info.nightscout.androidaps.plugins.general.nsclient.data
import android.content.Context
import info.nightscout.androidaps.interfaces.Config
import info.nightscout.androidaps.R
import info.nightscout.androidaps.annotations.OpenForTesting
import info.nightscout.androidaps.database.entities.UserEntry
import info.nightscout.androidaps.database.entities.UserEntry.Action
import info.nightscout.androidaps.logging.AAPSLogger
@ -113,6 +114,7 @@ import javax.inject.Singleton
}
*/
@Suppress("SpellCheckingInspection")
@OpenForTesting
@Singleton
class NSSettingsStatus @Inject constructor(
private val aapsLogger: AAPSLogger,

View file

@ -47,7 +47,7 @@ class TherapyEventDataPoint @Inject constructor(
}
override fun getLabel(): String? =
if (data.note != null) data.note
if (data.note.isNullOrBlank().not()) data.note
else translator.translate(data.type)
override fun getDuration(): Long = data.duration

View file

@ -13,6 +13,7 @@ import androidx.work.workDataOf
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.Constants
import info.nightscout.androidaps.R
import info.nightscout.androidaps.annotations.OpenForTesting
import info.nightscout.androidaps.data.DetailedBolusInfo
import info.nightscout.androidaps.database.AppRepository
import info.nightscout.androidaps.database.entities.OfflineEvent
@ -59,11 +60,13 @@ import javax.inject.Singleton
import kotlin.math.max
import kotlin.math.min
@OpenForTesting
@Singleton
class SmsCommunicatorPlugin @Inject constructor(
injector: HasAndroidInjector,
aapsLogger: AAPSLogger,
resourceHelper: ResourceHelper,
private val smsManager: SmsManager,
private val aapsSchedulers: AapsSchedulers,
private val sp: SP,
private val constraintChecker: ConstraintChecker,
@ -1088,7 +1091,6 @@ class SmsCommunicatorPlugin @Inject constructor(
}
fun sendSMS(sms: Sms): Boolean {
val smsManager = SmsManager.getDefault()
sms.text = stripAccents(sms.text)
try {
aapsLogger.debug(LTag.SMS, "Sending SMS to " + sms.phoneNumber + ": " + sms.text)

View file

@ -5,6 +5,7 @@ import com.eatthepath.otp.HmacOneTimePasswordGenerator
import com.google.common.io.BaseEncoding
import info.nightscout.androidaps.Constants
import info.nightscout.androidaps.R
import info.nightscout.androidaps.annotations.OpenForTesting
import info.nightscout.androidaps.utils.DateUtil
import info.nightscout.androidaps.utils.resources.ResourceHelper
import info.nightscout.androidaps.utils.sharedPreferences.SP
@ -15,6 +16,7 @@ import javax.crypto.spec.SecretKeySpec
import javax.inject.Inject
import javax.inject.Singleton
@OpenForTesting
@Singleton
class OneTimePassword @Inject constructor(
private val sp: SP,

View file

@ -8,6 +8,7 @@ import androidx.work.workDataOf
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.Constants
import info.nightscout.androidaps.R
import info.nightscout.androidaps.annotations.OpenForTesting
import info.nightscout.androidaps.data.ProfileSealed
import info.nightscout.androidaps.data.PureProfile
import info.nightscout.androidaps.events.EventProfileStoreChanged
@ -35,6 +36,7 @@ import javax.inject.Inject
import javax.inject.Singleton
import kotlin.collections.ArrayList
@OpenForTesting
@Singleton
class LocalProfilePlugin @Inject constructor(
injector: HasAndroidInjector,

View file

@ -6,6 +6,7 @@ import androidx.work.WorkerParameters
import androidx.work.workDataOf
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.R
import info.nightscout.androidaps.annotations.OpenForTesting
import info.nightscout.androidaps.database.AppRepository
import info.nightscout.androidaps.database.entities.GlucoseValue
import info.nightscout.androidaps.database.transactions.CgmSourceTransaction
@ -21,6 +22,7 @@ import info.nightscout.androidaps.utils.sharedPreferences.SP
import javax.inject.Inject
import javax.inject.Singleton
@OpenForTesting
@Singleton
class GlimpPlugin @Inject constructor(
injector: HasAndroidInjector,

View file

@ -4,12 +4,17 @@ import info.nightscout.androidaps.interfaces.Config
import info.nightscout.androidaps.Constants
import info.nightscout.androidaps.R
import info.nightscout.androidaps.database.AppRepository
import info.nightscout.androidaps.database.entities.TherapyEvent
import info.nightscout.androidaps.database.entities.UserEntry.Action
import info.nightscout.androidaps.database.entities.UserEntry.Sources
import info.nightscout.androidaps.database.entities.ValueWithUnit
import info.nightscout.androidaps.database.transactions.InsertTherapyEventAnnouncementTransaction
import info.nightscout.androidaps.interfaces.ActivePlugin
import info.nightscout.androidaps.interfaces.IobCobCalculator
import info.nightscout.androidaps.interfaces.ProfileFunction
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.logging.UserEntryLogger
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification
@ -38,7 +43,8 @@ class LocalAlertUtils @Inject constructor(
private val smsCommunicatorPlugin: SmsCommunicatorPlugin,
private val config: Config,
private val repository: AppRepository,
private val dateUtil: DateUtil
private val dateUtil: DateUtil,
private val uel: UserEntryLogger
) {
private val disposable = CompositeDisposable()
@ -59,6 +65,7 @@ class LocalAlertUtils @Inject constructor(
aapsLogger.debug(LTag.CORE, "Generating pump unreachable alarm. lastConnection: " + dateUtil.dateAndTimeString(lastConnection) + " isStatusOutdated: " + isStatusOutdated)
sp.putLong("nextPumpDisconnectedAlarm", System.currentTimeMillis() + pumpUnreachableThreshold())
rxBus.send(EventNewNotification(Notification(Notification.PUMP_UNREACHABLE, resourceHelper.gs(R.string.pump_unreachable), Notification.URGENT).also { it.soundId = R.raw.alarm }))
uel.log(Action.CAREPORTAL, Sources.Aaps, resourceHelper.gs(R.string.pump_unreachable), ValueWithUnit.TherapyEventType(TherapyEvent.Type.ANNOUNCEMENT))
if (sp.getBoolean(R.string.key_ns_create_announcements_from_errors, true))
disposable += repository.runTransaction(InsertTherapyEventAnnouncementTransaction(resourceHelper.gs(R.string.pump_unreachable))).subscribe()
}
@ -117,6 +124,7 @@ class LocalAlertUtils @Inject constructor(
n.soundId = R.raw.alarm
sp.putLong("nextMissedReadingsAlarm", System.currentTimeMillis() + missedReadingsThreshold())
rxBus.send(EventNewNotification(n))
uel.log(Action.CAREPORTAL, Sources.Aaps, resourceHelper.gs(R.string.missed_bg_readings), ValueWithUnit.TherapyEventType(TherapyEvent.Type.ANNOUNCEMENT))
if (sp.getBoolean(R.string.key_ns_create_announcements_from_errors, true)) {
n.text?.let { disposable += repository.runTransaction(InsertTherapyEventAnnouncementTransaction(it)).subscribe() }
}

View file

@ -1,10 +1,12 @@
package info.nightscout.androidaps.utils
import info.nightscout.androidaps.annotations.OpenForTesting
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
import javax.inject.Inject
import javax.inject.Singleton
@OpenForTesting
@Singleton
class Profiler @Inject constructor(val aapsLogger: AAPSLogger) {

View file

@ -4,6 +4,7 @@ import android.content.Context
import android.content.Intent
import android.os.Bundle
import info.nightscout.androidaps.R
import info.nightscout.androidaps.annotations.OpenForTesting
import info.nightscout.androidaps.interfaces.GlucoseUnit
import info.nightscout.androidaps.interfaces.ProfileFunction
import info.nightscout.androidaps.logging.AAPSLogger
@ -12,6 +13,7 @@ import info.nightscout.androidaps.utils.resources.ResourceHelper
import javax.inject.Inject
import javax.inject.Singleton
@OpenForTesting
@Singleton
class XdripCalibrations @Inject constructor(
private val aapsLogger: AAPSLogger,

View file

@ -1,6 +1,7 @@
package info.nightscout.androidaps.utils.buildHelper
import info.nightscout.androidaps.BuildConfig
import info.nightscout.androidaps.annotations.OpenForTesting
import info.nightscout.androidaps.interfaces.Config
import info.nightscout.androidaps.plugins.general.maintenance.PrefFileListProvider
import java.io.File

View file

@ -147,7 +147,6 @@
<string name="smscommunicator_loophasbeendisabled">Loop is gedeaktiveer</string>
<string name="smscommunicator_loophasbeenenabled">Loop is geaktiveerd</string>
<string name="smscommunicator_loopisenabled">Lus geaktiveer</string>
<string name="valuelimitedto">%1$.2f beperk tot %2$.2f</string>
<string name="smscommunicator_remotecommandnotallowed">Afstandbeheerde bevel word nie toegelaat nie</string>
<string name="smscommunicator_remotebolusnotallowed">Afstandbeheerde bolus nie beskikbaar nie. Probeer later weer.</string>
<string name="smscommunicator_profilereplywithcode">Om profiel te verander na %1$s %2$d%% antwoord met %3$s</string>

View file

@ -17,7 +17,6 @@
<string name="objectives_maxiob_gate">Прекарайте няколко дни по този начин, като поне една нощ нямате аларма за ниска КЗ</string>
<string name="objectives_autosens_objective">Настройване на базалния инсулин и коефициенти ако е необходимо и активиране на auto-sens</string>
<string name="objectives_autosens_gate">Една седмица успешно дневно използване с редовно въвеждане на въглехидрати</string>
<string name="objectives_ama_objective">Активиране на допълнителни функции за дневно използване, включително и advanced meal assist (АМА)</string>
<string name="objectives_smb_objective">Добавяне на допълнителни функции за използване през деня, като SMB</string>
<string name="objectives_auto_objective">Разрешаване на автоматизация</string>
<string name="objectives_smb_gate">Трябва да прочетете wiki и увеличите maxIOB за да може SMB да работи добре! Добро начало е maxIOB = средния болус за хранене + 3 пъти най-големия базал от профила</string>

View file

@ -188,7 +188,6 @@
<string name="smscommunicator_loophasbeendisabled">APS е деактивиран</string>
<string name="smscommunicator_loophasbeenenabled">APS е активиран</string>
<string name="smscommunicator_loopisenabled">APS е включен</string>
<string name="valuelimitedto">%1$.2f ограничен до %2$.2f</string>
<string name="smscommunicator_pumpconnectwithcode">За свързване с помпа отговорете с код %1$s</string>
<string name="smscommunicator_pumpconnectfail">Връзката с помпата е неуспешна</string>
<string name="smscommunicator_pumpdisconnectwithcode">За да спрете помпата за %1$d минути отговорете с код %2$s</string>

View file

@ -17,7 +17,6 @@
<string name="objectives_maxiob_gate">Provozovat smyčku několik dní s alespoň jednou nocí bez alarmů na nízkou glykémii</string>
<string name="objectives_autosens_objective">Upravit bazály a poměry, bude-li to potřeba, a povolit automatickou detekci citlivosti na inzulín</string>
<string name="objectives_autosens_gate">Jeden týden úspěšného používání s běžným příjmem sacharidů</string>
<string name="objectives_ama_objective">Povolení doplňkový funkcí pro každodenní použití, jako např. pokročilý jídelní asistent (AMA)</string>
<string name="objectives_smb_objective">Povolit další funkce pro běžné používání jako SMB</string>
<string name="objectives_auto_objective">Povolení automatizace</string>
<string name="objectives_smb_gate">Přečíst si dokumentaci a zvýšit maximální IOB, aby mohlo SMB fungovat. Pro začátek se dá použít velikost běžného bolusu + 3x maximální denní bazál</string>

View file

@ -189,8 +189,6 @@
<string name="smscommunicator_loophasbeendisabled">Smyčka byla zakázána</string>
<string name="smscommunicator_loophasbeenenabled">Smyčka byla povolena</string>
<string name="smscommunicator_loopisenabled">Smyčka je povolena</string>
<string name="valuelimitedto">%1$.2f omezeno na %2$.2f</string>
<string name="valueoutofrange">»%1$s« je mimo pevně nastavené limity</string>
<string name="smscommunicator_pumpconnectwithcode">Chcete-li připojit pumpu, odpovězte pomocí SMS s kódem %1$s</string>
<string name="smscommunicator_pumpconnectfail">Připojení k pumpě selhalo</string>
<string name="smscommunicator_pumpdisconnectwithcode">Chcete-li odpojit pumpu na %1$d minut, odpovězte pomocí SMS s kódem %2$s</string>
@ -858,16 +856,6 @@
<string name="email_address">E-mailová adresa</string>
<string name="privacy_settings">Nastavení soukromí</string>
<string name="privacy_summary">Pokud chcete být upozorněni na selhání aplikace, můžete zadat volitelně e-mailovou adresu. Toto není automatizovaná služba. Vývojáři vás budou kontaktovat v nebezpečných situacích.</string>
<string name="profile_low_target">Dolní cíl profilu</string>
<string name="profile_high_target">Horní cíl profilu</string>
<string name="temp_target_low_target">Dolní hodnota dočasného cíle</string>
<string name="temp_target_high_target">Horní hodnota dočasného cíle</string>
<string name="temp_target_value">Hodnota dočasného cíle</string>
<string name="profile_dia">Hodnota DIA profilu</string>
<string name="profile_sensitivity_value">Hodnota citlivosti profilu</string>
<string name="profile_max_daily_basal_value">Maximální hodnota bazálu profilu</string>
<string name="current_basal_value">Aktuální hodnota bazálu</string>
<string name="profile_carbs_ratio_value">Inzulino-sacharidový poměr profilu</string>
<string name="full_sync">Úplná synchronizace</string>
<string name="prime">Doplňování</string>
<string name="ns_sync_options">Synchronizace</string>

View file

@ -17,7 +17,6 @@
<string name="objectives_maxiob_gate">Bevor Du den Zielwert niedriger einstellst, musst Du einige Tage Erfahrung sammeln und mindestens eine Nacht ohne Hypoalarm schaffen</string>
<string name="objectives_autosens_objective">Passe Basalraten und Faktoren bei Bedarf an und schalte anschließend Autosens ein.</string>
<string name="objectives_autosens_gate">Loope eine Woche tagsüber mit regelmäßiger Kohlenhydrat-Eingabe</string>
<string name="objectives_ama_objective">Aktiviere zusätzliche Funktionen für die Nutzung tagsüber wie z. B. den erweiterten Mahlzeitenassistenten (AMA)</string>
<string name="objectives_smb_objective">Aktiviere zusätzliche Funktionen für die Nutzung tagsüber wie z. B. SMB</string>
<string name="objectives_auto_objective">Automatisierung aktivieren</string>
<string name="objectives_smb_gate">Lies das Wiki und erhöhe maxIOB, damit der SMB gut funktioniert. Ein guter Anfang ist

View file

@ -189,8 +189,6 @@
<string name="smscommunicator_loophasbeendisabled">Loop wurde deaktiviert.</string>
<string name="smscommunicator_loophasbeenenabled">Lopp wurde aktiviert.</string>
<string name="smscommunicator_loopisenabled">Loop ist aktiviert.</string>
<string name="valuelimitedto">%1$.2f limitiert auf %2$.2f</string>
<string name="valueoutofrange">»%1$s« ist außerhalb der fest programmierten Grenzen</string>
<string name="smscommunicator_pumpconnectwithcode">Um die Pumpe zu verbinden, antworte mit dem Code %1$s</string>
<string name="smscommunicator_pumpconnectfail">Verbindung zur Pumpe fehlgeschlagen</string>
<string name="smscommunicator_pumpdisconnectwithcode">Um die Verbindung zur Pumpe für %1$d Minuten zu trennen, antworte mit dem Code %2$s</string>
@ -859,16 +857,6 @@ Unerwartetes Verhalten.</string>
<string name="email_address">EMailAdresse</string>
<string name="privacy_settings">Privatsphäre-Einstellungen</string>
<string name="privacy_summary">Du kannst optional eine E-Mail-Adresse angeben, wenn Du bei Absturzberichten kontaktiert werden möchtest. Dies ist keine Automatik, Du wirst von den Entwicklern in gefährlichen Situationen kontaktiert. </string>
<string name="profile_low_target">Profil unteres Ziel</string>
<string name="profile_high_target">Profil oberes Ziel</string>
<string name="temp_target_low_target">Temp. Ziel unterer Wert</string>
<string name="temp_target_high_target">Temp. Ziel oberer Wert</string>
<string name="temp_target_value">Temp. Ziel Wert</string>
<string name="profile_dia">Profil Insulinwirkdauer</string>
<string name="profile_sensitivity_value">Profil Sensitivitätswert</string>
<string name="profile_max_daily_basal_value">Profil max. Basalwert</string>
<string name="current_basal_value">Aktueller Basalwert</string>
<string name="profile_carbs_ratio_value">Profil KH-Faktor</string>
<string name="full_sync">Vollständige Sync</string>
<string name="prime">Füllen</string>
<string name="ns_sync_options">Synchronisierung</string>

View file

@ -17,7 +17,6 @@
<string name="objectives_maxiob_gate">Τρέξτε το για λίγες ημέρες, και τουλάχιστον μία νύχτα χωρίς χαμηλό συναγερμό BG, πριν χαμηλώσετε τα όρια</string>
<string name="objectives_autosens_objective">Ρυθμίστε τον βασικό ρυθμό και τις αναλογίες αν χρειάζεται, και μετά ενεργοποιήστε το auto-sens</string>
<string name="objectives_autosens_gate">1 επιτυχής εβδομάδα ημερήσιου κυκλώματος με κανονική εισαγωγή υδατανθράκων</string>
<string name="objectives_ama_objective">Ενεργοποιώντας επιπρόσθετα χαρακτηριστικά για χρήση κατά την ημέρα, όπως τον Προχωρημένο Βοηθό Γεύματος</string>
<string name="objectives_smb_objective">Ενεργοποιώντας επιπρόσθετα χαρακτηριστικά για χρήση κατά την ημέρα, όπως το SMB</string>
<string name="objectives_smb_gate">Πρέπει να διαβάσετε τον οδηγό wiki και να αυξήσετε το ανώτατο όριο του IOB για να μπορέσει να λειτουργήσει σωστά το SMB! Μια καλή αρχή είναι μέγιστο IOB= μέσο bolus γεύματος + 3 x το μέγιστο ημερήσιο βασικού ρυθμού</string>
<string name="objectives_bgavailableinns">BG διαθέσιμες στο NS</string>

View file

@ -149,7 +149,6 @@
<string name="smscommunicator_loophasbeendisabled">Το κύκλωμα απενεργοποιήθηκε</string>
<string name="smscommunicator_loophasbeenenabled">Το κύκλωμα ενεργοποιήθηκε</string>
<string name="smscommunicator_loopisenabled">Κύκλωμα ενεργοποιημένο</string>
<string name="valuelimitedto">Το %1$.2f περιορίζεται σε %2$.2f</string>
<string name="smscommunicator_remotecommandnotallowed">Δεν επιτρέπεται απομακρυσμένη εντολή</string>
<string name="smscommunicator_remotebolusnotallowed">Απομακρυσμένο bolus μη διαθέσιμο. Δοκιμάστε ξανά αργότερα.</string>
<string name="smscommunicator_profilereplywithcode">Για αλλαγή προφίλ σε %1$s %2$d%% στείλτε κωδικό %3$s</string>

View file

@ -17,7 +17,6 @@
<string name="objectives_maxiob_gate">Usar unos cuantos días, y al menos una noche sin alarmas de glucosa baja, antes de bajar valor de glucosa</string>
<string name="objectives_autosens_objective">Ajustar las basales y ratios, si es necesario, y luego activar auto-sens</string>
<string name="objectives_autosens_gate">Una semana con éxito en lazo cerrado durante el día con entrada regular de carbohidratos</string>
<string name="objectives_ama_objective">Habilitar funciones adicionales para su uso durante el día, como el asistente de comida avanzado</string>
<string name="objectives_smb_objective">Habilitar funciones adicionales para uso durante el día como SMB</string>
<string name="objectives_auto_objective">Activar automatización</string>
<string name="objectives_smb_gate">¡Debes leer el wiki y subir maxIOB para que SMB funcione bien! Para comenzar un buen valor sería maxIOB = bolo de comida medio + 3 x máximo basal diario</string>

View file

@ -188,7 +188,6 @@
<string name="smscommunicator_loophasbeendisabled">Lazo se ha desactivado</string>
<string name="smscommunicator_loophasbeenenabled">Lazo se ha activado</string>
<string name="smscommunicator_loopisenabled">Lazo activo</string>
<string name="valuelimitedto">%1$.2f limitado a %2$.2f</string>
<string name="smscommunicator_pumpconnectwithcode">Para conectar la infusora responder con el código %1$s</string>
<string name="smscommunicator_pumpconnectfail">Error al conectar a la bomba</string>
<string name="smscommunicator_pumpdisconnectwithcode">Para desconectar la bomba durante %1$dminutos responde con el código %2$s</string>

View file

@ -132,6 +132,7 @@
<string name="wronginsulin_label">Erreurs de saisie/injection d\'insuline</string>
<string name="wronginsulin_whattodo">Que devriez-vous faire si vous avez reçu moins d\'insuline que l\'historique de la pompe suggère par ex. à cause d\'une occlusion, d\'une mauvaise canule ou d\'un oubli de rebranchement de la pompe après une douche ?</string>
<string name="wronginsulin_careportal">Supprimez les données d\'insuline de Nightscout Careportal pour le retirer de l\'historique de la pompe.</string>
<string name="wronginsulin_compare">Comparer les valeurs dans l\'historique d\'AndroidAPS et de la pompe (si la pompe le permet).</string>
<string name="wronginsulin_prime">Faites un bolus du montant de votre insuline calculée « manquante » soit par seringue / stylo ou en utilisant un amorçage.</string>
<string name="wronginsulin_donothing">Ne faites rien et laissez AndroidAPS corriger tout taux élevé de glycémie qui en résulte.</string>
<string name="iob_label">Insuline Active (IA)</string>

View file

@ -17,7 +17,6 @@
<string name="objectives_maxiob_gate">Utilisez pendant plusieurs jours, et au moins une nuit sans alarme dhypoglycémie, avant d\'abaisser les cibles glycémiques</string>
<string name="objectives_autosens_objective">Ajustement des débits Basal et des ratios si nécessaire, puis activation de la fonction auto-sens</string>
<string name="objectives_autosens_gate">1 semaine de Boucle Fermée en journée en saisissant régulièrement les glucides</string>
<string name="objectives_ama_objective">Activation de fonctionnalités supplémentaires en journée, comme l\'Aide au Repas Améliorée ARA (AMA)</string>
<string name="objectives_smb_objective">Activation de fonctionnalités supplémentaires pour l\'utilisation en journée, telles que la fonction SMB</string>
<string name="objectives_auto_objective">Activation de l\'automatisation</string>
<string name="objectives_smb_gate">Lisez le wiki et augmentez le maxIA pour que les SMBs fonctionnent correctement ! Un bon début est maxIA = moyenne des Bolus Repas + 3 x maximum débit Basal quotidien</string>

View file

@ -190,8 +190,6 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
<string name="smscommunicator_loophasbeendisabled">La Boucle a été désactivée</string>
<string name="smscommunicator_loophasbeenenabled">La Boucle a été activée</string>
<string name="smscommunicator_loopisenabled">La Boucle est activée</string>
<string name="valuelimitedto">%1$.2f limité à %2$.2f</string>
<string name="valueoutofrange">\"%1$s\" est en dehors des limites</string>
<string name="smscommunicator_pumpconnectwithcode">Pour connecter la pompe, renvoyez le code %1$s</string>
<string name="smscommunicator_pumpconnectfail">Echec de la connexion pompe</string>
<string name="smscommunicator_pumpdisconnectwithcode">Pour déconnecter la pompe pendant %1$d min, renvoyez le code %2$s</string>
@ -859,16 +857,6 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
<string name="email_address">Adresse e-mail</string>
<string name="privacy_settings">Paramètres de confidentialité</string>
<string name="privacy_summary">Vous pouvez fournir une adresse e-mail facultative si vous voulez être informé des plantages de l\'application. Ce n\'est pas un service automatisé. Vous serez contacté par les développeurs dans des situations dangereuses.</string>
<string name="profile_low_target">Cible basse du profil</string>
<string name="profile_high_target">Cible haute du profil</string>
<string name="temp_target_low_target">Valeur basse de cible temporaire</string>
<string name="temp_target_high_target">Valeur haute de cible temporaire</string>
<string name="temp_target_value">Valeur de cible temporaire</string>
<string name="profile_dia">Valeur DAI du profil</string>
<string name="profile_sensitivity_value">Valeur de sensibilité du profil</string>
<string name="profile_max_daily_basal_value">Basale maximale du profil</string>
<string name="current_basal_value">Basale actuelle</string>
<string name="profile_carbs_ratio_value">Rapport glucides/insuline de profil</string>
<string name="full_sync">Synchro. complète</string>
<string name="prime">Amorcer</string>
<string name="ns_sync_options">Synchronisation</string>
@ -892,4 +880,5 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
<string name="ns_receive_cgm_summary">Accepter les données MGC de NS</string>
<string name="sms_timeout_while_wating">Délai d\'attente pour finir la communication précédente avec la pompe</string>
<string name="smscommunicator_another_bolus_in_queue">Un autre bolus est en file d\'attente. Réessayez plus tard.</string>
<string name="calculation_in_progress">Calcul en cours</string>
</resources>

View file

@ -132,7 +132,7 @@
<string name="wronginsulin_label">Errori erogazione/inserimento insulina</string>
<string name="wronginsulin_whattodo">Cosa dovresti fare se hai ricevuto meno insulina di quanto lo storico del micro suggerisce? Ad esempio a causa di un\'occlusione, una cannula difettosa o l\'aver dimenticato di riattaccare il micro dopo una doccia? </string>
<string name="wronginsulin_careportal">Eliminare dal portale Nightscout i dati relativi all\'insulina per rimuoverli dallo storico del micro.</string>
<string name="wronginsulin_compare">Compara valori in AndroidAPS e storico micro (se supportato).</string>
<string name="wronginsulin_compare">Compara i valori in AndroidAPS con lo storico micro (se supportato).</string>
<string name="wronginsulin_prime">Erogare un bolo con parte della tua insulina calcolata \"mancante\" usando una siringa/penna o la funzione caricamento.</string>
<string name="wronginsulin_donothing">Non fare nulla e permettere ad AndroidAPS di correggere eventuali glicemie alte.</string>
<string name="iob_label">Insulina attiva (IOB)</string>

View file

@ -17,7 +17,6 @@
<string name="objectives_maxiob_gate">Esegui l\'applicazione per alcuni giorni e almeno una notte senza allarmi di glicemia bassa, prima di abbassare il target glicemico</string>
<string name="objectives_autosens_objective">Adatta basali e rapporti se necessario, quindi attiva auto-sens</string>
<string name="objectives_autosens_gate">1 settimana di looping diurno con inserimento regolare dei carboidrati, eseguito con successo</string>
<string name="objectives_ama_objective">Abilitazione funzioni aggiuntive per l\'uso diurno, ad esempio AMA (advanced meal assist - assistenza avanzata del pasto)</string>
<string name="objectives_smb_objective">Abilitazione funzioni aggiuntive per l\'uso diurno, come SMB</string>
<string name="objectives_auto_objective">Abilitazione automazione</string>
<string name="objectives_smb_gate">È necessario leggere il wiki e aumentare maxIOB affinché le azioni di SMB funzionino adeguatamente! Un buon inizio è maxIOB = media bolo posto + 3 x max basale giornaliera</string>

View file

@ -189,8 +189,6 @@
<string name="smscommunicator_loophasbeendisabled">Il loop è stato disabilitato</string>
<string name="smscommunicator_loophasbeenenabled">Il loop è stato abilitato</string>
<string name="smscommunicator_loopisenabled">Il loop è abilitato</string>
<string name="valuelimitedto">%1$.2f limitato a %2$.2f</string>
<string name="valueoutofrange">»%1$s« è fuori dai limiti consentiti</string>
<string name="smscommunicator_pumpconnectwithcode">Per connettere il micro rispondi col codice %1$s</string>
<string name="smscommunicator_pumpconnectfail">Connessione al micro fallita</string>
<string name="smscommunicator_pumpdisconnectwithcode">Per disconnettere il micro per %1$d minuti rispondi col codice %2$s</string>
@ -858,16 +856,6 @@
<string name="email_address">Indirizzo email</string>
<string name="privacy_settings">Impostazioni privacy</string>
<string name="privacy_summary">Puoi fornire un indirizzo e-mail opzionale se desideri essere avvisato in caso di arresti anomali dell\'app. Questo non è un servizio automatizzato. Sarai contattato dagli sviluppatori in situazioni pericolose.</string>
<string name="profile_low_target">Target basso (profilo)</string>
<string name="profile_high_target">Target alto (profilo)</string>
<string name="temp_target_low_target">Valore inferiore target temporaneo</string>
<string name="temp_target_high_target">Valore superiore target temporaneo</string>
<string name="temp_target_value">Valore target temporaneo</string>
<string name="profile_dia">Valore DIA (profilo)</string>
<string name="profile_sensitivity_value">Valore sensibilità (profilo)</string>
<string name="profile_max_daily_basal_value">Valore max basale (profilo)</string>
<string name="current_basal_value">Valore basale corrente</string>
<string name="profile_carbs_ratio_value">Valore rapporto CHO (profilo)</string>
<string name="full_sync">Sincronizzazione completa</string>
<string name="prime">Caricamento</string>
<string name="ns_sync_options">Sincronizzazione</string>

View file

@ -17,7 +17,6 @@
<string name="objectives_maxiob_gate">לפני הורדת ערך רמת הסוכר, הפעילו במשך מס\' ימים, עם לפחות לילה אחד ללא התרעת רמת סוכר נמוכה</string>
<string name="objectives_autosens_objective">במידת הצורך, בצעו התאמת בזאלי ויחסים, ולאחר מכן הפעילו את Autosens</string>
<string name="objectives_autosens_gate">שבוע של הפעלה מוצלחת של הלולאה במשך שעות היום, עם רישום ערכי פחמימות בקביעות</string>
<string name="objectives_ama_objective">הפעלת פונקציות נוספות לשימוש במשך היום, לדוגמה AMA (סיוע ארוחות מתקדם)</string>
<string name="objectives_smb_objective">הפעלת פונקציות נוספות לשימוש במשך היום, כגון סופר מיקרו בולוסים (SMB)</string>
<string name="objectives_auto_objective">הפעלת אוטומציה</string>
<string name="objectives_smb_gate">חובה לקרוא את הויקי ולהעלות את ערך ה-maxIOB כדי להפעיל את ה- SMB כראוי. התחלה טובה תהיה maxIOB=בולוס ממוצע + 3 פעמים ערך הבזאלי היומי המקסימלי</string>

View file

@ -189,8 +189,6 @@
<string name="smscommunicator_loophasbeendisabled">הלולאה הושבתה</string>
<string name="smscommunicator_loophasbeenenabled">הלולאה הופעלה</string>
<string name="smscommunicator_loopisenabled">לולאה פעילה</string>
<string name="valuelimitedto">%1$.2f מוגבלת ל- %2$.2f</string>
<string name="valueoutofrange">»הערך %1$s« מחוץ לתחום הקשיח</string>
<string name="smscommunicator_pumpconnectwithcode">לחיבור המשאבה יש להשיב עם הקוד %1$s</string>
<string name="smscommunicator_pumpconnectfail">החיבור אל המשאבה נכשל</string>
<string name="smscommunicator_pumpdisconnectwithcode">לניתוק המשאבה למשך %1$d דקות השיבו עם הקוד %2$s</string>
@ -858,16 +856,6 @@
<string name="email_address">כתובת דוא\"ל</string>
<string name="privacy_settings">הגדרות פרטיות</string>
<string name="privacy_summary">אם תרצו, תוכלו לספק כתובת דוא\"ל כדי לקבל דיווח על קריסות יישום. שירות זה אינו אוטומטי. המפתחים יצרו איתכם קשר במצבים מסוכנים.</string>
<string name="profile_low_target">ערך המטרה הנמוך של הפרופיל</string>
<string name="profile_high_target">ערך המטרה הגבוה של הפרופיל</string>
<string name="temp_target_low_target">ערך תחתון של המטרה הזמנית</string>
<string name="temp_target_high_target">ערך עליון של המטרה הזמנית</string>
<string name="temp_target_value">ערך המטרה הזמני</string>
<string name="profile_dia">ערך DIA של הפרופיל</string>
<string name="profile_sensitivity_value">ערך הרגישות של הפרופיל</string>
<string name="profile_max_daily_basal_value">ערך מינון בזאלי מרבי של הפרופיל</string>
<string name="current_basal_value">מינון בזאלי נוכחי</string>
<string name="profile_carbs_ratio_value">יחס הפחמימות של הפרופיל</string>
<string name="full_sync">סינכרון מלא</string>
<string name="prime">תיחול</string>
<string name="ns_sync_options">סינכרון</string>

View file

@ -17,7 +17,6 @@
<string name="objectives_maxiob_gate">혈당을 낮추기 전에 몇일간 사용해보되 최소한 하루는 저혈당 알람이 발생하지 않도록 해봅니다</string>
<string name="objectives_autosens_objective">필요하면 Basal과 비율을 조절하고, auto-sens를 활성화합니다</string>
<string name="objectives_autosens_gate">섭취한 탄수화물양을 입력하고 1주일동안 낮시간대에 loop를 성공적으로 사용하여 봅니다</string>
<string name="objectives_ama_objective">AMA(Advanced Meal Assist)같은 낮시간대를 위한 추가적인 기능들을 실행하여 봅니다</string>
<string name="objectives_smb_objective">낮시간대에 SMB(Super Micro Bolus)같은 추가기능을 활성화해 사용해봅니다</string>
<string name="objectives_auto_objective">자동화 사용</string>
<string name="objectives_smb_gate">SMB가 잘 작동하게 하기위해서 wiki를 반드시 읽은 다음 maxIOB 값을 올려보세요! maxIOB=평균 식사 Bolus + 3 x 최대하루 Basal이면 적당한 시작값입니다</string>

View file

@ -180,7 +180,6 @@
<string name="smscommunicator_loophasbeendisabled">Loop가 중지되었습니다.</string>
<string name="smscommunicator_loophasbeenenabled">Loop가 실행되었습니다.</string>
<string name="smscommunicator_loopisenabled">Loop가 실행중입니다.</string>
<string name="valuelimitedto">%1$.2f, %2$.2f으로 제한됨</string>
<string name="smscommunicator_remotecommandnotallowed">원격 명령이 허가되지 않았습니다</string>
<string name="smscommunicator_remotebolusnotallowed">원격 주입이 불가능합니다. 나중에 다시 시도해주세요.</string>
<string name="smscommunicator_profilereplywithcode">프로파일 %1$s %2$d%%로 변경하려면 %3$s 를 입력하고 답장하세요</string>

View file

@ -17,7 +17,6 @@
<string name="objectives_maxiob_gate">Praleiskite keletą dienų ir bent vieną naktį be hipoglikemijos aliarmų</string>
<string name="objectives_autosens_objective">Jei reikia, paderinkite valandines bazės vertes bei pagrindinius parametrus ir įgalinkite Autosens funkciją</string>
<string name="objectives_autosens_gate">1 savaitę praleiskite sėkmingai naudodami uždarąjį ciklą dienos metu ir įvesdami visus valgomus angliavandenius</string>
<string name="objectives_ama_objective">Dienos metu aktyvuokite papildomas funkcijas, tokias kaip pažangioji maisto skaičiuoklė (AMA Advanced Meal Assist)</string>
<string name="objectives_smb_objective">Dienos metu aktyvuokite papildomas funkcijas, tokias kaip SMB (Super Mikro Bolusas)</string>
<string name="objectives_auto_objective">Automatizavimo įjungimas</string>
<string name="objectives_smb_gate">Norėdami, kad SMB veiktų gerai, turite perskaityti dokumentaciją ir padidinti max AIO! Pradžiai patartina skaičiuoti taip: maxAIO=(didžiausia valandinė bazė x 3) + vidutinis bolusas</string>

View file

@ -186,7 +186,6 @@
<string name="smscommunicator_loophasbeendisabled">Ciklas buvo išjungtas</string>
<string name="smscommunicator_loophasbeenenabled">Ciklas buvo įjungtas</string>
<string name="smscommunicator_loopisenabled">Ciklas įjungtas</string>
<string name="valuelimitedto">%1$.2f apribotas iki %2$.2f</string>
<string name="smscommunicator_pumpconnectwithcode">Pompos prijungimui atsakykite su kodu %1$s</string>
<string name="smscommunicator_pumpconnectfail">Nepavyko prisijungti prie pompos</string>
<string name="smscommunicator_pumpdisconnectwithcode">Norėdami atjungti pompą %1$d min., atsakykite kodu %2$s</string>

View file

@ -17,7 +17,6 @@
<string name="objectives_maxiob_gate">Test enkele dagen als ook minstens 1 nacht zonder een laag BG alarm voordat je jouw streef BG verlaagt</string>
<string name="objectives_autosens_objective">Pas het basaal en de ratios aan indien nodig, activeer hierna de auto-sens optie</string>
<string name="objectives_autosens_gate">Gedurende 1 week succesvol overdag loopen met regelmatige invoer van koolhydraten</string>
<string name="objectives_ama_objective">Activeren van extra functies overdag zoals AMA (geavanceerde maaltijdhulp, Advanced Meal Assist)</string>
<string name="objectives_smb_objective">Activeren van extra functies overdag zoals SMB (super micro bolus)</string>
<string name="objectives_auto_objective">Automatisering inschakelen</string>
<string name="objectives_smb_gate">Lees de wiki en verhoog maxIOB om SMB goed werkend te krijgen. Een goed begin is maxIOB=gemiddelde maaltijdbolus + 3 x max dagelijkse basaal</string>

View file

@ -189,8 +189,6 @@
<string name="smscommunicator_loophasbeendisabled">Loop was uitgeschakeld</string>
<string name="smscommunicator_loophasbeenenabled">Loop was ingeschakeld</string>
<string name="smscommunicator_loopisenabled">Loop is ingeschakeld</string>
<string name="valuelimitedto">%1$.2f gelimiteerd tot %2$.2f</string>
<string name="valueoutofrange">»Waarde %1$s is buiten de toegestane limieten</string>
<string name="smscommunicator_pumpconnectwithcode">Om verbinding te maken met pomp antwoord met code %1$s</string>
<string name="smscommunicator_pumpconnectfail">Verbinding maken met pomp is mislukt</string>
<string name="smscommunicator_pumpdisconnectwithcode">Om de pomp te ontkoppelen gedurende %1$d minuten antwoord met code %2$s</string>
@ -858,15 +856,6 @@
<string name="email_address">E-mailadres</string>
<string name="privacy_settings">Privacyinstellingen</string>
<string name="privacy_summary">U kunt optioneel een e-mailadres opgeven als u op de hoogte wilt worden gebracht van applicatie crashes. Dit is geen geautomatiseerde service. De ontwikkelaars zullen contact met u opnemen bij gevaarlijke situaties.</string>
<string name="profile_low_target">Profiel laag doel</string>
<string name="profile_high_target">Profiel hoog doel</string>
<string name="temp_target_low_target">Tijdelijk streefdoel onder grens</string>
<string name="temp_target_high_target">Tijdelijk streefdoel boven grens</string>
<string name="temp_target_value">Tijdelijk streefdoel waarde</string>
<string name="profile_dia">Profiel DIA waarde</string>
<string name="profile_sensitivity_value">Profiel gevoeligheidswaarde</string>
<string name="profile_max_daily_basal_value">Maximale basaal waarde van het profiel</string>
<string name="current_basal_value">Huidige basaal waarde</string>
<string name="full_sync">Volledige synchronisatie</string>
<string name="prime">Vullen</string>
<string name="ns_sync_options">Synchronisatie</string>

View file

@ -17,7 +17,6 @@
<string name="objectives_maxiob_gate">Kjør i noen dager og opplev minst en natt uten lavt BS alarmer før du begynner å redusere målverdi for BS</string>
<string name="objectives_autosens_objective">Juster om nødvendig basal og forholdstall, og deretter aktiverer du autosens</string>
<string name="objectives_autosens_gate">1 uke vellykket looping på dagtid hvor alle måltider (KH) angis</string>
<string name="objectives_ama_objective">Aktiver ekstra funksjoner for bruk på dagtid, slik som avansert måltidsassistent (AMA)</string>
<string name="objectives_smb_objective">Aktiver ekstra funksjoner for bruk på dagtid, slik som SMB (Super Micro Bolus)</string>
<string name="objectives_auto_objective">Aktiver Automatisering</string>
<string name="objectives_smb_gate">Du må lese wiki og øke din maxIOB for å få SMB til å fungere. Et godt utgangspunkt er maxIOB = gjennomsnittlig måltidsbolus + 3*max daglig basal</string>

View file

@ -189,8 +189,6 @@
<string name="smscommunicator_loophasbeendisabled">Loop har blitt deaktivert</string>
<string name="smscommunicator_loophasbeenenabled">Loop har blitt aktivert</string>
<string name="smscommunicator_loopisenabled">Loop er aktivert</string>
<string name="valuelimitedto">%1$.2f begrenset til %2$.2f</string>
<string name="valueoutofrange">»%1$s« er utenfor lovlige grenseverdier</string>
<string name="smscommunicator_pumpconnectwithcode">For å koble til pumpen, svar med kode %1$s</string>
<string name="smscommunicator_pumpconnectfail">Tilkobling til pumpen mislyktes</string>
<string name="smscommunicator_pumpdisconnectwithcode">For å koble fra pumpen i %1$d minutter, svar med koden %2$s</string>
@ -858,16 +856,6 @@
<string name="email_address">E-postadresse</string>
<string name="privacy_settings">Personverninnstillinger</string>
<string name="privacy_summary">Du kan oppgi valgfri e-postadresse hvis du ønsker å bli varslet om krasj. Dette er ikke en automatisert tjeneste. Du vil bli kontaktet av utviklere ved farlige hendelser.</string>
<string name="profile_low_target">Profil lavt blodsukkermål</string>
<string name="profile_high_target">Profil høyt blodsukkermål</string>
<string name="temp_target_low_target">Midlertidig mål bunnverdi</string>
<string name="temp_target_high_target">Midlertidig mål toppverdi</string>
<string name="temp_target_value">Midlertidig målverdi</string>
<string name="profile_dia">Profil insulinvarighet (DIA)</string>
<string name="profile_sensitivity_value">Profil sensitivitetsverdi (IF)</string>
<string name="profile_max_daily_basal_value">Profil maksimal basal dose</string>
<string name="current_basal_value">Aktiv basal dose</string>
<string name="profile_carbs_ratio_value">Profil karbohydratfaktor (IK)</string>
<string name="full_sync">Full synkronisering</string>
<string name="prime">Prime</string>
<string name="ns_sync_options">Synkronisering</string>

View file

@ -17,7 +17,6 @@
<string name="objectives_maxiob_gate">Używaj pętli przez kilka dni i przynajmniej jedną noc bez żadnego alarmu niskiego poziomu, przed obniżeniem docelowego poziomu cukru</string>
<string name="objectives_autosens_objective">Dostosuj bazę i wartości parametrów jeśli jest to potrzebne, i wtedy uruchom funkcję autosens</string>
<string name="objectives_autosens_gate">1 tydzień sukcesu w działaniu pętli w ciągu dnia z regularnym wprowadzaniem spożywanych węglowodanów</string>
<string name="objectives_ama_objective">Włączanie dodatkowych funkcji do użytku, jak AMA</string>
<string name="objectives_smb_objective">Włączanie dodatkowych funkcji do użytku, jak SMB (Super Mikro Bolusy)</string>
<string name="objectives_auto_objective">Włączanie automatyzacji</string>
<string name="objectives_smb_gate">Musisz przeczytać wiki i zwiększyć maxIOB, aby SMB działało dobrze! Dobrym początkiem jest maxIOB = średni bolus + 3 x maks. dzienna dawka bazowa</string>

View file

@ -188,7 +188,6 @@
<string name="smscommunicator_loophasbeendisabled">Pętla (Loop) została wyłączona</string>
<string name="smscommunicator_loophasbeenenabled">Pętla (Loop) została włączona</string>
<string name="smscommunicator_loopisenabled">Pętla (Loop) jest włączona</string>
<string name="valuelimitedto">%1$.2f ograniczone do %2$.2f</string>
<string name="smscommunicator_pumpconnectwithcode">Aby podłączyć pompę odpowiedz kodem %1$s</string>
<string name="smscommunicator_pumpconnectfail">Połączenie z pompą nie powiodło się</string>
<string name="smscommunicator_pumpdisconnectwithcode">Aby odłączyć pompę na %1$d minut odpowiedz kodem %2$s</string>

View file

@ -17,7 +17,6 @@
<string name="objectives_maxiob_gate">Utilizar por alguns dias e pelo menos uma noite sem alarmes de Glic baixa, antes de baixar Glic</string>
<string name="objectives_autosens_objective">Ajuste as basais e os rácios, se necessário, e, em seguida, active o auto-sens</string>
<string name="objectives_autosens_gate">1 semana de looping durante o dia com sucesso com entrada regular de hidratos de carbono</string>
<string name="objectives_ama_objective">A ativar recursos adicionais para uso durante o dia, como assistente avançado de refeição</string>
<string name="objectives_smb_objective">Ativando recursos adicionais para uso durante o dia, como SMB</string>
<string name="objectives_auto_objective">A ativar a automação</string>
<string name="objectives_smb_gate">Deverá ler a wiki e aumentar a IOB máx para que os SMBs funcionem devidamente! Inicialmente poderá considerar maxIOB=média dos bólus + 3 x a basal máxima</string>

View file

@ -175,7 +175,6 @@
<string name="smscommunicator_loophasbeendisabled">Loop foi desativado</string>
<string name="smscommunicator_loophasbeenenabled">Loop foi ativado</string>
<string name="smscommunicator_loopisenabled">Loop ativado</string>
<string name="valuelimitedto">%1$.2f limitado a %2$.2f</string>
<string name="smscommunicator_pumpdisconnected">Bomba desconectada</string>
<string name="smscommunicator_reconnect">Bomba reconectada</string>
<string name="smscommunicator_remotecommandnotallowed">O comando remoto não é permitido</string>

View file

@ -17,7 +17,6 @@
<string name="objectives_maxiob_gate">Utilizar por alguns dias e pelo menos uma noite sem alarmes de GLIC baixa, antes de baixar GLIC</string>
<string name="objectives_autosens_objective">Ajuste as basais e os rácios, se necessário, e, em seguida, active o auto-sens</string>
<string name="objectives_autosens_gate">1 semana de looping durante o dia com sucesso com entrada regular de hidratos de carbono</string>
<string name="objectives_ama_objective">A activar recursos adicionais para uso durante o dia, como assistente avançado de refeição</string>
<string name="objectives_smb_objective">Activando recursos adicionais para uso durante o dia, como SMB</string>
<string name="objectives_auto_objective">A ativar a automatização</string>
<string name="objectives_smb_gate">Deverá ler a wiki e aumentar a IA máx para que os SMBs funcionem devidamente! Inicialmente poderá considerar maxIA=média dos bólus + 3 x a basal máxima</string>

View file

@ -189,8 +189,6 @@
<string name="smscommunicator_loophasbeendisabled">Loop foi desactivado</string>
<string name="smscommunicator_loophasbeenenabled">Loop foi activado</string>
<string name="smscommunicator_loopisenabled">Loop activado</string>
<string name="valuelimitedto">%1$.2f limitado a %2$.2f</string>
<string name="valueoutofrange">»%1$s« está fora dos limites máximos</string>
<string name="smscommunicator_pumpconnectwithcode">Para ligar a bomba responda com o código %1$s</string>
<string name="smscommunicator_pumpconnectfail">Ligação à bomba falhou</string>
<string name="smscommunicator_pumpdisconnectwithcode">Para remover a bomba por %1$d minutos responda com o código %2$s</string>
@ -857,14 +855,4 @@
<string name="email_address">Endereço de email</string>
<string name="privacy_settings">Definições de privacidade</string>
<string name="privacy_summary">Opcionalmente pode fornecer um endereço de e-mail se quiser ser notificado sobre os erros da app. Este não é um serviço automatizado. Será contactado por desenvolvedores em situações perigosas.</string>
<string name="profile_low_target">Perfil Alvo Baixo</string>
<string name="profile_high_target">Perfil Alvo Alto</string>
<string name="temp_target_low_target">Valor Alvo Temporário Inferior</string>
<string name="temp_target_high_target">Valor Alvo Temporário Superior</string>
<string name="temp_target_value">Valor Alvo Temporário</string>
<string name="profile_dia">Valor Perfil DIA</string>
<string name="profile_sensitivity_value">Valor Perfil Sensibilidade</string>
<string name="profile_max_daily_basal_value">Valor Perfil Basal Máxima</string>
<string name="current_basal_value">Valor Actual Basal</string>
<string name="profile_carbs_ratio_value">Valor Perfil Rácio Hidratos</string>
</resources>

View file

@ -17,7 +17,6 @@
<string name="objectives_maxiob_gate">Se rulează pentru câteva zile și cel puțin o noapte fără a avea alarme de glicemie mică înainte de scăderea țintei</string>
<string name="objectives_autosens_objective">Ajustarea bazalelor și a factorilor dacă este necesar și apoi activarea auto-sens</string>
<string name="objectives_autosens_gate">O săptămână de buclă închisă încheiată cu succes în condițiile introducerii regulate a carbohidraților</string>
<string name="objectives_ama_objective">Activarea unor facilități adiționale pentru funcționarea în timpul zilei, cum ar fi advanced meal assist</string>
<string name="objectives_smb_objective">Se activează opțiuni pentru uzul în timpul zilei, cum ar fi SMB</string>
<string name="objectives_auto_objective">Activarea automatizării</string>
<string name="objectives_smb_gate">Trebuie sa citiți wiki și să măriți maxIOB pentru a obține SMB corect! Un start bun este maxIOB=media bolusurilor + 3x maxima bazalei din zi</string>

View file

@ -188,7 +188,6 @@
<string name="smscommunicator_loophasbeendisabled">Bucla a fost dezactivată</string>
<string name="smscommunicator_loophasbeenenabled">Bucla a fost activată</string>
<string name="smscommunicator_loopisenabled">Bucla este activată</string>
<string name="valuelimitedto">%1$.2f este limitată la %2$.2f</string>
<string name="smscommunicator_pumpconnectwithcode">Pentru a conecta pompa raspundeti cu codul %1$s</string>
<string name="smscommunicator_pumpconnectfail">Conectarea cu pompa a esuat</string>
<string name="smscommunicator_pumpdisconnectwithcode">Pentru a deconecta pompa timp de %1$d minute, răspundeți cu: %2$s</string>

View file

@ -17,7 +17,6 @@
<string name="objectives_maxiob_gate">Работа несколько дней и по кр мере одну ночь без срабатывания оповещений о низкой ГК</string>
<string name="objectives_autosens_objective">Настраиваем базал и коэффициенты с последующей активацией auto-sens</string>
<string name="objectives_autosens_gate">1 неделя успешной дневной работы с регулярным введением углеводов</string>
<string name="objectives_ama_objective">Активация таких доп функций для дневного времени как расширенный калькулятор болюса advanced meal assist</string>
<string name="objectives_smb_objective">Активация таких доп функций для дневного времени как супер микро болюс SMB</string>
<string name="objectives_auto_objective">Включение автоматизации</string>
<string name="objectives_smb_gate">Прочтите wiki и увеличьте maxIOB чтобы супер микро болюс SMB заработал как положено! Хорошее начало maxIOB = средний болюс на еду + троекратный максимальный суточный базал</string>

View file

@ -189,8 +189,6 @@
<string name="smscommunicator_loophasbeendisabled">зцикл был деактивирован</string>
<string name="smscommunicator_loophasbeenenabled">зцикл был активирован</string>
<string name="smscommunicator_loopisenabled">зцикл работает</string>
<string name="valuelimitedto">%1$.2f ограничено до %2$.2f</string>
<string name="valueoutofrange">»%1$s«за пределами жестких ограничений</string>
<string name="smscommunicator_pumpconnectwithcode">Чтобы подсоединить помпу ответьте кодом %1$s</string>
<string name="smscommunicator_pumpconnectfail">Ошибка подключения к помпе</string>
<string name="smscommunicator_pumpdisconnectwithcode">Для разъединения с помпой на %1$d мин ответьте кодом %2$s</string>
@ -860,16 +858,6 @@ Context | Edit Context</string>
<string name="email_address">Адрес электронной почты</string>
<string name="privacy_settings">Настройки конфиденцальности</string>
<string name="privacy_summary">Вы можете указать дополнительно адрес электронной почты, если хотите получать уведомления о сбоях приложения; что является не автоматизированной рассылкой, а способом связи с разработчиками в опасных ситуациях.</string>
<string name="profile_low_target">Нижнее целевое значение профиля</string>
<string name="profile_high_target">Верхнее целевое значение профиля</string>
<string name="temp_target_low_target">Нижнее значение временного целевого уровня</string>
<string name="temp_target_high_target">Верхнее значение временного целевого уровня</string>
<string name="temp_target_value">Временное целевое значение</string>
<string name="profile_dia">Значение длительности действия инсулина DIA в профиле</string>
<string name="profile_sensitivity_value">Значение чувствительности в профиле</string>
<string name="profile_max_daily_basal_value">Максимальное значение базала в профиле</string>
<string name="current_basal_value">Текущее значение базала</string>
<string name="profile_carbs_ratio_value">Коэффициент углеводов в профиле</string>
<string name="full_sync">Полная синхронизация</string>
<string name="prime">Заполнение инфузионной системы</string>
<string name="ns_sync_options">Синхронизация</string>

View file

@ -17,7 +17,6 @@
<string name="objectives_maxiob_gate">Používať uzavretý okruh niekoľko dní s aspoň jednou nocou bez alarmov na nízku glykémiu</string>
<string name="objectives_autosens_objective">Upraviť bazály a pomery, ak je to potrebné, a povoliť automatickú detekciu citlivosti na inzulín</string>
<string name="objectives_autosens_gate">Jeden týždeň úspešného používania s bežným príjmom sacharidov</string>
<string name="objectives_ama_objective">Povolenie doplnkových funkcií pre každodenné použitie, ako napr. pokročilý asistent jedál (AMA)</string>
<string name="objectives_smb_objective">Povoliť ďalšie funkcie pre bežné používanie ako SMB</string>
<string name="objectives_auto_objective">Povolenie automatiky</string>
<string name="objectives_smb_gate">Prečítať si dokumentáciu a zvýšiť maximálne IOB, aby mohlo správne fungovať SMB! Pre začiatok sa dá použiť veľkosť bežného bolusu + 3x maximálny denný bazál</string>

View file

@ -189,8 +189,6 @@
<string name="smscommunicator_loophasbeendisabled">Uzavretý okruh bol deaktivovaný</string>
<string name="smscommunicator_loophasbeenenabled">Uzavretý okruh bol aktivovaný</string>
<string name="smscommunicator_loopisenabled">Uzavretý okruh je aktivovaný</string>
<string name="valuelimitedto">%1$.2f obmedzené na %2$.2f</string>
<string name="valueoutofrange">»%1$s« je mimo pevne nastavené limity</string>
<string name="smscommunicator_pumpconnectwithcode">Ak chcete pripojiť pumpu, odpovedzte pomocou SMS s kódom %1$s</string>
<string name="smscommunicator_pumpconnectfail">Pripojenie k pumpe zlyhalo</string>
<string name="smscommunicator_pumpdisconnectwithcode">Ak chcete odpojiť pumpu na %1$d minút, odpovedzte pomocou SMS s kódom %2$s</string>
@ -858,16 +856,6 @@
<string name="email_address">Emailová adresa</string>
<string name="privacy_settings">Nastavenia súkromia</string>
<string name="privacy_summary">Pokiaľ chcete byť upozornení na zlyhanie aplikácie, môžete zadať voliteľne e-mailovú adresu. Toto nie je automatizovaná služba. Vývojári vás budú kontaktovať v nebezpečných situáciách.</string>
<string name="profile_low_target">Dolný cieľ profilu</string>
<string name="profile_high_target">Horný cieľ profilu</string>
<string name="temp_target_low_target">Dolná hodnota dočasného cieľa</string>
<string name="temp_target_high_target">Horná hodnota dočasného cieľa</string>
<string name="temp_target_value">Hodnota dočasného cieľa</string>
<string name="profile_dia">Profilová hodnota DIA</string>
<string name="profile_sensitivity_value">Profilová hodnota citlivosti</string>
<string name="profile_max_daily_basal_value">Profilová maximálna hodnota bazálu</string>
<string name="current_basal_value">Aktuálna hodnota bazálu</string>
<string name="profile_carbs_ratio_value">Profilový inzulino-sacharidový pomer</string>
<string name="full_sync">Úplná synchronizácia</string>
<string name="prime">Plnenie</string>
<string name="ns_sync_options">Synchronizácia</string>

View file

@ -17,7 +17,6 @@
<string name="objectives_maxiob_gate">Kör några dagar och åtminstone en natt utan larm för lågt BG innan du sänker målvärdet för BG</string>
<string name="objectives_autosens_objective">Justera basaler och kvoter om det behövs. Aktivera sedan autosens</string>
<string name="objectives_autosens_gate">1 veckas lyckad looping dagtid, där alla måltider lagts in</string>
<string name="objectives_ama_objective">Aktiverar extra funktioner som kan användas dagtid, såsom avancerad måltidsassistans, AMA</string>
<string name="objectives_smb_objective">Aktiverar ytterligare funktioner för användning dagtid, t ex SMB</string>
<string name="objectives_auto_objective">Aktivera automatisering</string>
<string name="objectives_smb_gate">Du måste läsa på wikin och öka max IOB för att få SMB att fungera bra. En bra start är att sätta max IOB till din genomsnittliga måltidsbolus plus 3 gånger den högsta basalen du har under ett dygn</string>

View file

@ -190,8 +190,6 @@ Eversense-appen.</string>
<string name="smscommunicator_loophasbeendisabled">Loop inaktiverad.</string>
<string name="smscommunicator_loophasbeenenabled">Loop aktiverad</string>
<string name="smscommunicator_loopisenabled">Loop är aktiverad</string>
<string name="valuelimitedto">%1$.2f begränsat till %2$.2f</string>
<string name="valueoutofrange">»%1$s« är utanför de hårda gränserna</string>
<string name="smscommunicator_pumpconnectwithcode">För att ansluta pumpen, svara med kod %1$s</string>
<string name="smscommunicator_pumpconnectfail">Anslutning till pump misslyckades</string>
<string name="smscommunicator_pumpdisconnectwithcode">För att koppla från pumpen i %1$d minuter, svara med kod %2$s</string>
@ -859,16 +857,6 @@ Eversense-appen.</string>
<string name="email_address">E-postadress</string>
<string name="privacy_settings">Sekretessinställningar</string>
<string name="privacy_summary">Du kan ange valfri e-postadress om du vill få meddelanden om appkrascher. Det här är ingen automatiserad tjänst. Du kommer att kontaktas av utvecklare i farliga situationer.</string>
<string name="profile_low_target">Nedre målvärde för profilen</string>
<string name="profile_high_target">Övre målvärde för profilen</string>
<string name="temp_target_low_target">Nedre värde för temp mål</string>
<string name="temp_target_high_target">Övre värde för temp mål</string>
<string name="temp_target_value">Temp målvärde</string>
<string name="profile_dia">Profilens DIA</string>
<string name="profile_sensitivity_value">Profilens insulinkänslighetsvärde</string>
<string name="profile_max_daily_basal_value">Maximal basaldos för profil</string>
<string name="current_basal_value">Nuvarande basaldos</string>
<string name="profile_carbs_ratio_value">Profilens KH-kvot</string>
<string name="full_sync">Full synkronisering</string>
<string name="prime">Förfyllning</string>
<string name="ns_sync_options">Synkronisering</string>

View file

@ -145,7 +145,6 @@
<string name="smscommunicator_loophasbeendisabled">Döngü devre dışı bırakıldı</string>
<string name="smscommunicator_loophasbeenenabled">Döngü etkinleştirildi</string>
<string name="smscommunicator_loopisenabled">Döngü etkin</string>
<string name="valuelimitedto">%1$.2f dan %2$.2f olarak sınırlı</string>
<string name="smscommunicator_remotecommandnotallowed">Uzaktan komuta izin verilmez</string>
<string name="smscommunicator_suspendreplywithcode">%1$d dakika için Döngü\'yü askıya almak için %2$s kodunu yanıtla</string>
<string name="smscommunicator_tempbasalset">Geçici bazal %1$.2fÜ/s %2$d dakika için başarıyla başlatıldı</string>

View file

@ -146,7 +146,6 @@
<string name="smscommunicator_loophasbeendisabled">闭环已经被禁用</string>
<string name="smscommunicator_loophasbeenenabled">闭环已经被启用</string>
<string name="smscommunicator_loopisenabled">闭环被启用</string>
<string name="valuelimitedto">%1$.2f 超过 %2$.2f的限制</string>
<string name="smscommunicator_remotecommandnotallowed">远程命令没有被允许</string>
<string name="smscommunicator_remotebolusnotallowed">远程大剂量不可用。请稍后再试。</string>
<string name="smscommunicator_profilereplywithcode">要切换配置文件到 %1$s %2$d%% 请回复代码 %3$s</string>

View file

@ -180,7 +180,7 @@
android:inputType="numberDecimal"
android:key="@string/key_activity_target"
android:title="@string/activity_target"
validate:floatmaxNumber="220.0"
validate:floatmaxNumber="180.0"
validate:floatminNumber="6.0"
validate:testType="floatNumericRange" />
@ -198,7 +198,7 @@
android:inputType="numberDecimal"
android:key="@string/key_hypo_target"
android:title="@string/hypo_target"
validate:floatmaxNumber="220.0"
validate:floatmaxNumber="180.0"
validate:floatminNumber="6.0"
validate:testType="floatNumericRange" />

View file

@ -7,7 +7,11 @@ import info.nightscout.androidaps.data.ProfileSealed
import info.nightscout.androidaps.database.embedments.InsulinConfiguration
import info.nightscout.androidaps.database.entities.EffectiveProfileSwitch
import info.nightscout.androidaps.extensions.pureProfileFromJson
import info.nightscout.androidaps.interfaces.*
import info.nightscout.androidaps.interfaces.ActivePlugin
import info.nightscout.androidaps.interfaces.Config
import info.nightscout.androidaps.interfaces.IobCobCalculator
import info.nightscout.androidaps.interfaces.ProfileFunction
import info.nightscout.androidaps.interfaces.ProfileStore
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.utils.DateUtil
import info.nightscout.androidaps.utils.FabricPrivacy
@ -15,10 +19,8 @@ import info.nightscout.androidaps.utils.resources.ResourceHelper
import org.json.JSONObject
import org.junit.Before
import org.mockito.Mock
import org.powermock.core.classloader.annotations.PrepareForTest
@Suppress("SpellCheckingInspection")
@PrepareForTest(FabricPrivacy::class)
open class TestBaseWithProfile : TestBase() {
@Mock lateinit var activePluginProvider: ActivePlugin

View file

@ -15,7 +15,6 @@ import org.junit.Before
import org.junit.Test
import org.mockito.Mock
import org.mockito.Mockito.`when`
import org.powermock.api.mockito.PowerMockito
class QuickWizardTest : TestBase() {
@ -44,7 +43,7 @@ class QuickWizardTest : TestBase() {
@Before
fun mock() {
PowerMockito.`when`(profileFunction.secondsFromMidnight()).thenReturn(0)
`when`(profileFunction.secondsFromMidnight()).thenReturn(0)
`when`(sp.getString(R.string.key_quickwizard, "[]")).thenReturn("[]")
quickWizard = QuickWizard(sp, injector)
}

View file

@ -1,6 +1,5 @@
package info.nightscout.androidaps.interfaces
import android.content.Context
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.R
@ -36,22 +35,13 @@ 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
import java.util.*
/**
* Created by mike on 18.03.2018.
*/
@RunWith(PowerMockRunner::class)
@PrepareForTest(
ConstraintChecker::class, SP::class, Context::class,
OpenAPSAMAPlugin::class, OpenAPSSMBPlugin::class,
VirtualPumpPlugin::class, DetailedBolusInfoStorage::class, TemporaryBasalStorage::class, GlimpPlugin::class, Profiler::class,
UserEntryLogger::class, PrefFileListProvider::class, AppRepository::class, InsightDatabaseDao::class)
class ConstraintsCheckerTest : TestBaseWithProfile() {
@Mock lateinit var activePlugin: ActivePlugin
@ -98,7 +88,6 @@ class ConstraintsCheckerTest : TestBaseWithProfile() {
fun prepare() {
`when`(resourceHelper.gs(R.string.closed_loop_disabled_on_dev_branch)).thenReturn("Running dev version. Closed loop is disabled.")
`when`(resourceHelper.gs(R.string.closedmodedisabledinpreferences)).thenReturn("Closed loop mode disabled in preferences")
`when`(resourceHelper.gs(R.string.objectivenotstarted)).thenReturn("Objective %d not started")
`when`(resourceHelper.gs(R.string.novalidbasalrate)).thenReturn("No valid basal rate read from pump")
`when`(resourceHelper.gs(R.string.autosensdisabledinpreferences)).thenReturn("Autosens disabled in preferences")
`when`(resourceHelper.gs(R.string.smbdisabledinpreferences)).thenReturn("SMB disabled in preferences")
@ -125,6 +114,10 @@ class ConstraintsCheckerTest : TestBaseWithProfile() {
`when`(resourceHelper.gs(R.string.limitingbasalratio, 0.8, "pump limit")).thenReturn("")
`when`(resourceHelper.gs(R.string.limitingpercentrate, 200, "pump limit")).thenReturn("")
`when`(resourceHelper.gs(R.string.combo_pump_unsupported_operation)).thenReturn("Requested operation not supported by pump")
`when`(resourceHelper.gs(R.string.objectivenotstarted, 9)).thenReturn("Objective 9 not started")
`when`(resourceHelper.gs(R.string.objectivenotstarted, 8)).thenReturn("Objective 8 not started")
`when`(resourceHelper.gs(R.string.objectivenotstarted, 6)).thenReturn("Objective 6 not started")
`when`(resourceHelper.gs(R.string.objectivenotstarted, 1)).thenReturn("Objective 1 not started")
// RS constructor
`when`(sp.getString(R.string.key_danars_address, "")).thenReturn("")

View file

@ -4,7 +4,6 @@ import android.app.NotificationManager
import android.content.Context
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.utils.buildHelper.ConfigImpl
import info.nightscout.androidaps.R
import info.nightscout.androidaps.TestBase
import info.nightscout.androidaps.database.AppRepository
@ -17,19 +16,15 @@ import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpPlugin
import info.nightscout.androidaps.receivers.ReceiverStatusStore
import info.nightscout.androidaps.utils.DateUtil
import info.nightscout.androidaps.utils.FabricPrivacy
import info.nightscout.androidaps.utils.buildHelper.ConfigImpl
import info.nightscout.androidaps.utils.resources.ResourceHelper
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, ReceiverStatusStore::class, RunningConfiguration::class, UserEntryLogger::class, DateUtil::class)
class LoopPluginTest : TestBase() {
@Mock lateinit var sp: SP

View file

@ -11,13 +11,8 @@ import info.nightscout.androidaps.utils.resources.ResourceHelper
import info.nightscout.androidaps.utils.sharedPreferences.SP
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.Mock
import org.powermock.core.classloader.annotations.PrepareForTest
import org.powermock.modules.junit4.PowerMockRunner
@RunWith(PowerMockRunner::class)
@PrepareForTest(UserEntryLogger::class)
class ConfigBuilderPluginTest : TestBase() {
@Mock lateinit var sp: SP

View file

@ -11,14 +11,11 @@ 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.powermock.modules.junit4.PowerMockRunner
import java.text.DateFormat
import java.text.SimpleDateFormat
import java.util.*
@RunWith(PowerMockRunner::class)
class DstHelperPluginTest : TestBase() {
@Mock lateinit var resourceHelper: ResourceHelper
@ -42,31 +39,31 @@ class DstHelperPluginTest : TestBase() {
var cal = Calendar.getInstance(tz, Locale.ITALIAN)
val df: DateFormat = SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.ITALIAN)
var dateBeforeDST = df.parse("2018-03-25 01:55")
cal.time = dateBeforeDST
cal.time = dateBeforeDST!!
Assert.assertEquals(false, plugin.wasDST(cal))
Assert.assertEquals(true, plugin.willBeDST(cal))
TimeZone.setDefault(tz)
cal = Calendar.getInstance(tz, Locale.ITALIAN)
dateBeforeDST = df.parse("2018-03-25 03:05")
cal.time = dateBeforeDST
cal.time = dateBeforeDST!!
Assert.assertEquals(true, plugin.wasDST(cal))
Assert.assertEquals(false, plugin.willBeDST(cal))
TimeZone.setDefault(tz)
cal = Calendar.getInstance(tz, Locale.ITALIAN)
dateBeforeDST = df.parse("2018-03-25 02:05") //Cannot happen!!!
cal.time = dateBeforeDST
cal.time = dateBeforeDST!!
Assert.assertEquals(true, plugin.wasDST(cal))
Assert.assertEquals(false, plugin.willBeDST(cal))
TimeZone.setDefault(tz)
cal = Calendar.getInstance(tz, Locale.ITALIAN)
dateBeforeDST = df.parse("2018-03-25 05:55") //Cannot happen!!!
cal.time = dateBeforeDST
cal.time = dateBeforeDST!!
Assert.assertEquals(true, plugin.wasDST(cal))
Assert.assertEquals(false, plugin.willBeDST(cal))
TimeZone.setDefault(tz)
cal = Calendar.getInstance(tz, Locale.ITALIAN)
dateBeforeDST = df.parse("2018-03-25 06:05") //Cannot happen!!!
cal.time = dateBeforeDST
cal.time = dateBeforeDST!!
Assert.assertEquals(false, plugin.wasDST(cal))
Assert.assertEquals(false, plugin.willBeDST(cal))
}

View file

@ -2,7 +2,6 @@ package info.nightscout.androidaps.plugins.constraints.objectives
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.utils.buildHelper.ConfigImpl
import info.nightscout.androidaps.R
import info.nightscout.androidaps.TestBase
import info.nightscout.androidaps.interfaces.ActivePlugin
@ -10,19 +9,15 @@ import info.nightscout.androidaps.interfaces.Constraint
import info.nightscout.androidaps.logging.UserEntryLogger
import info.nightscout.androidaps.plugins.constraints.objectives.objectives.Objective
import info.nightscout.androidaps.utils.DateUtil
import info.nightscout.androidaps.utils.buildHelper.ConfigImpl
import info.nightscout.androidaps.utils.resources.ResourceHelper
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(UserEntryLogger::class, DateUtil::class)
class ObjectivesPluginTest : TestBase() {
@Mock lateinit var resourceHelper: ResourceHelper
@ -46,7 +41,10 @@ class ObjectivesPluginTest : TestBase() {
@Before fun prepareMock() {
objectivesPlugin = ObjectivesPlugin(injector, aapsLogger, resourceHelper, activePlugin, sp, ConfigImpl(), dateUtil, uel)
objectivesPlugin.onStart()
`when`(resourceHelper.gs(R.string.objectivenotstarted)).thenReturn("Objective %1\$d not started")
`when`(resourceHelper.gs(R.string.objectivenotstarted, 9)).thenReturn("Objective 9 not started")
`when`(resourceHelper.gs(R.string.objectivenotstarted, 8)).thenReturn("Objective 8 not started")
`when`(resourceHelper.gs(R.string.objectivenotstarted, 6)).thenReturn("Objective 6 not started")
`when`(resourceHelper.gs(R.string.objectivenotstarted, 1)).thenReturn("Objective 1 not started")
}
@Test fun notStartedObjectivesShouldLimitLoopInvocation() {
@ -78,7 +76,7 @@ class ObjectivesPluginTest : TestBase() {
objectivesPlugin.objectives[ObjectivesPlugin.SMB_OBJECTIVE].startedOn = 0
var c = Constraint(true)
c = objectivesPlugin.isSMBModeEnabled(c)
Assert.assertEquals(true, c.getReasons(aapsLogger).contains("Objective 10 not started"))
Assert.assertEquals(true, c.getReasons(aapsLogger).contains("Objective 9 not started"))
Assert.assertEquals(false, c.value())
}
}

View file

@ -2,7 +2,6 @@ package info.nightscout.androidaps.plugins.constraints.safety
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.utils.buildHelper.ConfigImpl
import info.nightscout.androidaps.Constants
import info.nightscout.androidaps.R
import info.nightscout.androidaps.TestBaseWithProfile
@ -18,18 +17,14 @@ import info.nightscout.androidaps.plugins.sensitivity.SensitivityOref1Plugin
import info.nightscout.androidaps.plugins.source.GlimpPlugin
import info.nightscout.androidaps.utils.HardLimits
import info.nightscout.androidaps.utils.buildHelper.BuildHelper
import info.nightscout.androidaps.utils.buildHelper.ConfigImpl
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, BuildHelper::class, VirtualPumpPlugin::class, GlimpPlugin::class)
class SafetyPluginTest : TestBaseWithProfile() {
@Mock lateinit var sp: SP
@ -231,17 +226,18 @@ class SafetyPluginTest : TestBaseWithProfile() {
}
@Test fun iobShouldBeLimited() {
`when`(openAPSSMBPlugin.isEnabled()).thenReturn(true)
`when`(openAPSAMAPlugin.isEnabled()).thenReturn(false)
`when`(sp.getString(R.string.key_aps_mode, "open")).thenReturn("closed")
`when`(sp.getDouble(R.string.key_openapsma_max_iob, 1.5)).thenReturn(1.5)
`when`(sp.getDouble(R.string.key_openapssmb_max_iob, 3.0)).thenReturn(3.0)
`when`(sp.getString(R.string.key_age, "")).thenReturn("teenage")
// Apply all limits
var d = Constraint(Constants.REALLYHIGHIOB)
d = safetyPlugin.applyMaxIOBConstraints(d)
Assert.assertEquals(1.5, d.value(), 0.01)
Assert.assertEquals("""
Safety: Limiting IOB to 1.5 U because of max value in preferences
""".trimIndent(), d.getReasons(aapsLogger))
Assert.assertEquals("Safety: Limiting IOB to 1.5 U because of max value in preferences", d.getMostLimitedReasons(aapsLogger))
Assert.assertEquals(3.0, d.value(), 0.01)
Assert.assertEquals("Safety: Limiting IOB to 3.0 U because of max value in preferences\nSafety: Limiting IOB to 12.0 U because of hard limit", d.getReasons(aapsLogger))
Assert.assertEquals("Safety: Limiting IOB to 3.0 U because of max value in preferences", d.getMostLimitedReasons(aapsLogger))
}
}

View file

@ -10,14 +10,11 @@ import info.nightscout.androidaps.utils.resources.ResourceHelper
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.mockito.Mockito.anyInt
import org.mockito.Mockito.anyLong
import org.powermock.modules.junit4.PowerMockRunner
@RunWith(PowerMockRunner::class)
class StorageConstraintPluginTest : TestBase() {
@Mock lateinit var resourceHelper: ResourceHelper

View file

@ -2,24 +2,19 @@ package info.nightscout.androidaps.plugins.general.maintenance
import android.content.Context
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.utils.buildHelper.ConfigImpl
import info.nightscout.androidaps.TestBase
import info.nightscout.androidaps.plugins.general.nsclient.data.NSSettingsStatus
import info.nightscout.androidaps.utils.buildHelper.BuildHelper
import info.nightscout.androidaps.utils.buildHelper.ConfigImpl
import info.nightscout.androidaps.utils.resources.ResourceHelper
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
import java.io.File
@RunWith(PowerMockRunner::class)
@PrepareForTest(NSSettingsStatus::class, BuildHelper::class, LoggerUtils::class, PrefFileListProvider::class)
class MaintenancePluginTest : TestBase() {
@Mock lateinit var injector: HasAndroidInjector

View file

@ -12,19 +12,13 @@ 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.ArgumentMatchers.anyBoolean
import org.mockito.ArgumentMatchers.anyInt
import org.mockito.ArgumentMatchers.anyLong
import org.mockito.ArgumentMatchers.anyString
import org.mockito.Mock
import org.mockito.Mockito.`when`
import org.powermock.api.mockito.PowerMockito
import org.powermock.core.classloader.annotations.PrepareForTest
import org.powermock.modules.junit4.PowerMockRunner
@RunWith(PowerMockRunner::class)
@PrepareForTest(SP::class, Context::class)
class NsClientReceiverDelegateTest : TestBase() {
@Mock lateinit var context: Context
@ -47,7 +41,6 @@ class NsClientReceiverDelegateTest : TestBase() {
}
@Test fun testCalculateStatusChargingState() {
PowerMockito.mockStatic(SP::class.java)
`when`(sp.getBoolean(anyInt(), anyBoolean())).thenReturn(false)
var ev = EventChargingState(true, 0)
Assert.assertTrue(sut!!.calculateStatus(ev))
@ -61,7 +54,6 @@ class NsClientReceiverDelegateTest : TestBase() {
}
@Test fun testCalculateStatusNetworkState() {
PowerMockito.mockStatic(SP::class.java)
// wifiOnly = false
// allowRoaming = false as well
`when`(sp.getBoolean(anyInt(), anyBoolean())).thenReturn(false)

View file

@ -13,17 +13,12 @@ import info.nightscout.androidaps.utils.resources.ResourceHelper
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.mockito.Mockito.doAnswer
import org.mockito.invocation.InvocationOnMock
import org.mockito.stubbing.Answer
import org.powermock.api.mockito.PowerMockito
import org.powermock.core.classloader.annotations.PrepareForTest
import org.powermock.modules.junit4.PowerMockRunner
@RunWith(PowerMockRunner::class)
@PrepareForTest(SmsCommunicatorPlugin::class, DateUtil::class, OneTimePassword::class)
class AuthRequestTest : TestBase() {
@Mock lateinit var smsCommunicatorPlugin: SmsCommunicatorPlugin
@ -48,7 +43,7 @@ class AuthRequestTest : TestBase() {
@Before fun prepareTests() {
`when`(resourceHelper.gs(R.string.sms_wrongcode)).thenReturn("Wrong code. Command cancelled.")
PowerMockito.doAnswer(Answer { invocation: InvocationOnMock ->
doAnswer(Answer { invocation: InvocationOnMock ->
sentSms = invocation.getArgument(0)
null
} as Answer<*>).`when`(smsCommunicatorPlugin).sendSMS(anyObject())
@ -87,11 +82,10 @@ class AuthRequestTest : TestBase() {
// test timed out message
val now: Long = 10000
PowerMockito.mockStatic(DateUtil::class.java)
PowerMockito.`when`(dateUtil.now()).thenReturn(now)
`when`(dateUtil.now()).thenReturn(now)
authRequest = AuthRequest(injector, requester, "Request text", "ABC", action)
actionCalled = false
PowerMockito.`when`(dateUtil.now()).thenReturn(now + T.mins(Constants.SMS_CONFIRM_TIMEOUT).msecs() + 1)
`when`(dateUtil.now()).thenReturn(now + T.mins(Constants.SMS_CONFIRM_TIMEOUT).msecs() + 1)
authRequest.action("ABC")
Assert.assertFalse(actionCalled)
}

View file

@ -2,10 +2,7 @@ package info.nightscout.androidaps.plugins.general.smsCommunicator
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
import org.powermock.modules.junit4.PowerMockRunner
@RunWith(PowerMockRunner::class)
class SmsActionTest {
var result = ""

View file

@ -1,5 +1,3 @@
@file:Suppress("SpellCheckingInspection")
package info.nightscout.androidaps.plugins.general.smsCommunicator
import android.telephony.SmsManager
@ -29,9 +27,7 @@ import info.nightscout.androidaps.plugins.profile.local.LocalProfilePlugin
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType
import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpPlugin
import info.nightscout.androidaps.queue.Callback
import info.nightscout.androidaps.queue.CommandQueue
import info.nightscout.androidaps.utils.DateUtil
import info.nightscout.androidaps.utils.FabricPrivacy
import info.nightscout.androidaps.utils.T
import info.nightscout.androidaps.utils.XdripCalibrations
import info.nightscout.androidaps.utils.buildHelper.ConfigImpl
@ -40,24 +36,15 @@ import io.reactivex.Single
import org.junit.Assert
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.ArgumentMatchers
import org.mockito.Mock
import org.mockito.Mockito
import org.mockito.Mockito.`when`
import org.mockito.Mockito.anyLong
import org.mockito.invocation.InvocationOnMock
import org.powermock.api.mockito.PowerMockito
import org.powermock.core.classloader.annotations.PrepareForTest
import org.powermock.modules.junit4.PowerMockRunner
import java.util.*
@RunWith(PowerMockRunner::class)
@PrepareForTest(
ConstraintChecker::class, FabricPrivacy::class, VirtualPumpPlugin::class, XdripCalibrations::class,
SmsManager::class, CommandQueue::class, LocalProfilePlugin::class, DateUtil::class,
OneTimePassword::class, UserEntryLogger::class, LoopPlugin::class,
AppRepository::class, DateUtil::class, AutosensDataStore::class)
@Suppress("SpellCheckingInspection")
class SmsCommunicatorPluginTest : TestBaseWithProfile() {
@Mock lateinit var sp: SP
@ -73,6 +60,7 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() {
@Mock lateinit var repository: AppRepository
@Mock lateinit var dateUtilMocked: DateUtil
@Mock lateinit var autosensDataStore: AutosensDataStore
@Mock lateinit var smsManager: SmsManager
var injector: HasAndroidInjector = HasAndroidInjector {
AndroidInjector {
@ -102,9 +90,6 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() {
`when`(iobCobCalculator.ads).thenReturn(autosensDataStore)
`when`(autosensDataStore.lastBg()).thenReturn(reading)
PowerMockito.mockStatic(SmsManager::class.java)
val smsManager = PowerMockito.mock(SmsManager::class.java)
`when`(SmsManager.getDefault()).thenReturn(smsManager)
`when`(sp.getString(R.string.key_smscommunicator_allowednumbers, "")).thenReturn("1234;5678")
`when`(
@ -113,7 +98,7 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() {
}))
val glucoseStatusProvider = GlucoseStatusProvider(aapsLogger = aapsLogger, iobCobCalculator = iobCobCalculator, dateUtil = dateUtilMocked)
smsCommunicatorPlugin = SmsCommunicatorPlugin(injector, aapsLogger, resourceHelper, aapsSchedulers, sp, constraintChecker, rxBus, profileFunction, fabricPrivacy, activePlugin, commandQueue, loopPlugin, iobCobCalculator, xdripCalibrations, otp, ConfigImpl(), dateUtilMocked, uel, glucoseStatusProvider, repository)
smsCommunicatorPlugin = SmsCommunicatorPlugin(injector, aapsLogger, resourceHelper, smsManager, aapsSchedulers, sp, constraintChecker, rxBus, profileFunction, fabricPrivacy, activePlugin, commandQueue, loopPlugin, iobCobCalculator, xdripCalibrations, otp, ConfigImpl(), dateUtilMocked, uel, glucoseStatusProvider, repository)
smsCommunicatorPlugin.setPluginEnabled(PluginType.GENERAL, true)
Mockito.doAnswer { invocation: InvocationOnMock ->
val callback = invocation.getArgument<Callback>(1)
@ -310,7 +295,7 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() {
`when`(sp.getBoolean(R.string.key_smscommunicator_remotecommandsallowed, false)).thenReturn(true)
//LOOP STATUS : disabled
PowerMockito.`when`(loopPlugin.enabled).thenReturn(false)
`when`(loopPlugin.enabled).thenReturn(false)
smsCommunicatorPlugin.messages = ArrayList()
sms = Sms("1234", "LOOP STATUS")
smsCommunicatorPlugin.processSms(sms)
@ -318,9 +303,9 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() {
Assert.assertEquals("Loop is disabled", smsCommunicatorPlugin.messages[1].text)
//LOOP STATUS : suspended
PowerMockito.`when`(loopPlugin.minutesToEndOfSuspend()).thenReturn(10)
PowerMockito.`when`(loopPlugin.enabled).thenReturn(true)
PowerMockito.`when`(loopPlugin.isSuspended).thenReturn(true)
`when`(loopPlugin.minutesToEndOfSuspend()).thenReturn(10)
`when`(loopPlugin.enabled).thenReturn(true)
`when`(loopPlugin.isSuspended).thenReturn(true)
smsCommunicatorPlugin.messages = ArrayList()
sms = Sms("1234", "LOOP STATUS")
smsCommunicatorPlugin.processSms(sms)
@ -328,8 +313,8 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() {
Assert.assertEquals("Suspended (10 m)", smsCommunicatorPlugin.messages[1].text)
//LOOP STATUS : enabled
PowerMockito.`when`(loopPlugin.enabled).thenReturn(true)
PowerMockito.`when`(loopPlugin.isSuspended).thenReturn(false)
`when`(loopPlugin.enabled).thenReturn(true)
`when`(loopPlugin.isSuspended).thenReturn(false)
smsCommunicatorPlugin.messages = ArrayList()
sms = Sms("1234", "LOOP STATUS")
smsCommunicatorPlugin.processSms(sms)
@ -338,7 +323,7 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() {
Assert.assertEquals("Loop is enabled", smsCommunicatorPlugin.messages[1].text)
//LOOP : wrong format
PowerMockito.`when`(loopPlugin.enabled).thenReturn(true)
`when`(loopPlugin.enabled).thenReturn(true)
smsCommunicatorPlugin.messages = ArrayList()
sms = Sms("1234", "LOOP")
smsCommunicatorPlugin.processSms(sms)
@ -347,7 +332,7 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() {
Assert.assertEquals("Wrong format", smsCommunicatorPlugin.messages[1].text)
//LOOP DISABLE : already disabled
PowerMockito.`when`(loopPlugin.enabled).thenReturn(false)
`when`(loopPlugin.enabled).thenReturn(false)
smsCommunicatorPlugin.messages = ArrayList()
sms = Sms("1234", "LOOP DISABLE")
smsCommunicatorPlugin.processSms(sms)
@ -357,7 +342,7 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() {
//LOOP DISABLE : from enabled
hasBeenRun = false
PowerMockito.`when`(loopPlugin.enabled).thenReturn(true)
`when`(loopPlugin.enabled).thenReturn(true)
// PowerMockito.doAnswer(Answer {
// hasBeenRun = true
// null
@ -375,7 +360,7 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() {
//Assert.assertTrue(hasBeenRun)
//LOOP ENABLE : already enabled
PowerMockito.`when`(loopPlugin.enabled).thenReturn(true)
`when`(loopPlugin.enabled).thenReturn(true)
smsCommunicatorPlugin.messages = ArrayList()
sms = Sms("1234", "LOOP ENABLE")
smsCommunicatorPlugin.processSms(sms)
@ -385,7 +370,7 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() {
//LOOP ENABLE : from disabled
hasBeenRun = false
PowerMockito.`when`(loopPlugin.enabled).thenReturn(false)
`when`(loopPlugin.enabled).thenReturn(false)
// PowerMockito.doAnswer(Answer {
// hasBeenRun = true
// null
@ -479,8 +464,8 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() {
Assert.assertEquals("Wrong format", smsCommunicatorPlugin.messages[1].text)
//NSCLIENT RESTART
PowerMockito.`when`(loopPlugin.isEnabled(PluginType.LOOP)).thenReturn(true)
PowerMockito.`when`(loopPlugin.isSuspended).thenReturn(false)
`when`(loopPlugin.isEnabled(PluginType.LOOP)).thenReturn(true)
`when`(loopPlugin.isSuspended).thenReturn(false)
smsCommunicatorPlugin.messages = ArrayList()
sms = Sms("1234", "NSCLIENT RESTART")
smsCommunicatorPlugin.processSms(sms)
@ -489,8 +474,8 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() {
Assert.assertTrue(smsCommunicatorPlugin.messages[1].text.contains("NSCLIENT RESTART"))
//NSCLIENT BLA BLA
PowerMockito.`when`(loopPlugin.isEnabled(PluginType.LOOP)).thenReturn(true)
PowerMockito.`when`(loopPlugin.isSuspended).thenReturn(false)
`when`(loopPlugin.isEnabled(PluginType.LOOP)).thenReturn(true)
`when`(loopPlugin.isSuspended).thenReturn(false)
smsCommunicatorPlugin.messages = ArrayList()
sms = Sms("1234", "NSCLIENT BLA BLA")
smsCommunicatorPlugin.processSms(sms)
@ -499,8 +484,8 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() {
Assert.assertEquals("Wrong format", smsCommunicatorPlugin.messages[1].text)
//NSCLIENT BLABLA
PowerMockito.`when`(loopPlugin.isEnabled(PluginType.LOOP)).thenReturn(true)
PowerMockito.`when`(loopPlugin.isSuspended).thenReturn(false)
`when`(loopPlugin.isEnabled(PluginType.LOOP)).thenReturn(true)
`when`(loopPlugin.isSuspended).thenReturn(false)
smsCommunicatorPlugin.messages = ArrayList()
sms = Sms("1234", "NSCLIENT BLABLA")
smsCommunicatorPlugin.processSms(sms)
@ -536,7 +521,7 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() {
repository.runTransactionForResult(anyObject<Transaction<CancelCurrentOfflineEventIfAnyTransaction.TransactionResult>>())
).thenReturn(Single.just(CancelCurrentOfflineEventIfAnyTransaction.TransactionResult().apply {
}))
PowerMockito.`when`(loopPlugin.enabled).thenReturn(true)
`when`(loopPlugin.enabled).thenReturn(true)
smsCommunicatorPlugin.messages = ArrayList()
sms = Sms("1234", "PUMP CONNECT")
smsCommunicatorPlugin.processSms(sms)
@ -902,7 +887,7 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() {
Assert.assertEquals("BOLUS", smsCommunicatorPlugin.messages[0].text)
Assert.assertEquals("Wrong format", smsCommunicatorPlugin.messages[1].text)
`when`(constraintChecker.applyBolusConstraints(anyObject())).thenReturn(Constraint(1.0))
PowerMockito.`when`(dateUtilMocked.now()).thenReturn(1000L)
`when`(dateUtilMocked.now()).thenReturn(1000L)
`when`(sp.getLong(R.string.key_smscommunicator_remotebolusmindistance, T.msecs(Constants.remoteBolusMinDistance).mins())).thenReturn(15L)
//BOLUS 1
smsCommunicatorPlugin.messages = ArrayList()
@ -911,7 +896,7 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() {
Assert.assertEquals("BOLUS 1", smsCommunicatorPlugin.messages[0].text)
Assert.assertEquals("Remote bolus not available. Try again later.", smsCommunicatorPlugin.messages[1].text)
`when`(constraintChecker.applyBolusConstraints(anyObject())).thenReturn(Constraint(0.0))
PowerMockito.`when`(dateUtilMocked.now()).thenReturn(Constants.remoteBolusMinDistance + 1002L)
`when`(dateUtilMocked.now()).thenReturn(Constants.remoteBolusMinDistance + 1002L)
//BOLUS 0
smsCommunicatorPlugin.messages = ArrayList()
@ -942,13 +927,13 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() {
//BOLUS 1 (Suspended pump)
smsCommunicatorPlugin.lastRemoteBolusTime = 0
PowerMockito.`when`(virtualPumpPlugin.isSuspended()).thenReturn(true)
`when`(virtualPumpPlugin.isSuspended()).thenReturn(true)
smsCommunicatorPlugin.messages = ArrayList()
sms = Sms("1234", "BOLUS 1")
smsCommunicatorPlugin.processSms(sms)
Assert.assertEquals("BOLUS 1", smsCommunicatorPlugin.messages[0].text)
Assert.assertEquals("Pump suspended", smsCommunicatorPlugin.messages[1].text)
PowerMockito.`when`(virtualPumpPlugin.isSuspended()).thenReturn(false)
`when`(virtualPumpPlugin.isSuspended()).thenReturn(false)
//BOLUS 1 a
smsCommunicatorPlugin.messages = ArrayList()
@ -993,7 +978,7 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() {
smsCommunicatorPlugin.processSms(sms)
Assert.assertEquals("CAL 0", smsCommunicatorPlugin.messages[0].text)
Assert.assertEquals("Wrong format", smsCommunicatorPlugin.messages[1].text)
PowerMockito.`when`(xdripCalibrations.sendIntent(ArgumentMatchers.anyDouble())).thenReturn(true)
`when`(xdripCalibrations.sendIntent(ArgumentMatchers.anyDouble())).thenReturn(true)
//CAL 1
smsCommunicatorPlugin.messages = ArrayList()
sms = Sms("1234", "CAL 1")
@ -1007,7 +992,7 @@ class SmsCommunicatorPluginTest : TestBaseWithProfile() {
}
@Test fun processCarbsTest() {
PowerMockito.`when`(dateUtilMocked.now()).thenReturn(1000000L)
`when`(dateUtilMocked.now()).thenReturn(1000000L)
`when`(sp.getBoolean(R.string.key_smscommunicator_remotecommandsallowed, false)).thenReturn(false)
//CAL
smsCommunicatorPlugin.messages = ArrayList()

View file

@ -4,19 +4,15 @@ import android.telephony.SmsMessage
import info.nightscout.androidaps.TestBase
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
import org.powermock.api.mockito.PowerMockito
import org.powermock.core.classloader.annotations.PrepareForTest
import org.powermock.modules.junit4.PowerMockRunner
import org.mockito.Mockito
import org.mockito.Mockito.`when`
@RunWith(PowerMockRunner::class)
@PrepareForTest(SmsMessage::class)
class SmsTest : TestBase() {
@Test fun doTests() {
val smsMessage = PowerMockito.mock(SmsMessage::class.java)
PowerMockito.`when`(smsMessage.originatingAddress).thenReturn("aNumber")
PowerMockito.`when`(smsMessage.messageBody).thenReturn("aBody")
val smsMessage = Mockito.mock(SmsMessage::class.java)
`when`(smsMessage.originatingAddress).thenReturn("aNumber")
`when`(smsMessage.messageBody).thenReturn("aBody")
var sms = Sms(smsMessage)
Assert.assertEquals(sms.phoneNumber, "aNumber")
Assert.assertEquals(sms.text, "aBody")

View file

@ -5,10 +5,7 @@ import info.nightscout.androidaps.plugins.general.tidepool.messages.DatasetReply
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNull
import org.junit.Test
import org.junit.runner.RunWith
import org.powermock.modules.junit4.PowerMockRunner
@RunWith(PowerMockRunner::class)
class SessionTest {
@Test
fun populateBody() {

View file

@ -1,7 +1,6 @@
package info.nightscout.androidaps.plugins.pump.virtual
import dagger.android.AndroidInjector
import info.nightscout.androidaps.utils.buildHelper.ConfigImpl
import info.nightscout.androidaps.R
import info.nightscout.androidaps.TestBase
import info.nightscout.androidaps.interfaces.CommandQueueProvider
@ -12,19 +11,15 @@ import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType
import info.nightscout.androidaps.utils.DateUtil
import info.nightscout.androidaps.utils.FabricPrivacy
import info.nightscout.androidaps.utils.buildHelper.ConfigImpl
import info.nightscout.androidaps.utils.resources.ResourceHelper
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.powermock.api.mockito.PowerMockito
import org.powermock.core.classloader.annotations.PrepareForTest
import org.powermock.modules.junit4.PowerMockRunner
import org.mockito.Mockito.`when`
@RunWith(PowerMockRunner::class)
@PrepareForTest(FabricPrivacy::class, DateUtil::class)
class VirtualPumpPluginUTest : TestBase() {
private val rxBus = RxBusWrapper(aapsSchedulers)
@ -46,16 +41,16 @@ class VirtualPumpPluginUTest : TestBase() {
@Test
fun refreshConfiguration() {
PowerMockito.`when`(sp.getString(R.string.key_virtualpump_type, "Generic AAPS")).thenReturn("Accu-Chek Combo")
`when`(sp.getString(R.string.key_virtualpump_type, "Generic AAPS")).thenReturn("Accu-Chek Combo")
virtualPumpPlugin.refreshConfiguration()
Assert.assertEquals(PumpType.ACCU_CHEK_COMBO, virtualPumpPlugin.pumpType)
}
@Test
fun refreshConfigurationTwice() {
PowerMockito.`when`(sp.getString(R.string.key_virtualpump_type, "Generic AAPS")).thenReturn("Accu-Chek Combo")
`when`(sp.getString(R.string.key_virtualpump_type, "Generic AAPS")).thenReturn("Accu-Chek Combo")
virtualPumpPlugin.refreshConfiguration()
PowerMockito.`when`(sp.getString(R.string.key_virtualpump_type, "Generic AAPS")).thenReturn("Accu-Chek Combo")
`when`(sp.getString(R.string.key_virtualpump_type, "Generic AAPS")).thenReturn("Accu-Chek Combo")
virtualPumpPlugin.refreshConfiguration()
Assert.assertEquals(PumpType.ACCU_CHEK_COMBO, virtualPumpPlugin.pumpType)
}

View file

@ -13,11 +13,8 @@ import info.nightscout.androidaps.utils.sharedPreferences.SP
import org.json.JSONObject
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.Mock
import org.powermock.modules.junit4.PowerMockRunner
@RunWith(PowerMockRunner::class)
class AbstractSensitivityPluginTest : TestBase() {
@Mock lateinit var pluginDescription: PluginDescription

View file

@ -8,11 +8,8 @@ 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.powermock.modules.junit4.PowerMockRunner
@RunWith(PowerMockRunner::class)
class MM640GPluginTest : TestBase() {
private lateinit var mM640gPlugin: MM640gPlugin

View file

@ -1,18 +1,15 @@
package info.nightscout.androidaps.plugins.source
import dagger.android.AndroidInjector
import info.nightscout.androidaps.utils.buildHelper.ConfigImpl
import info.nightscout.androidaps.TestBase
import info.nightscout.androidaps.utils.buildHelper.ConfigImpl
import info.nightscout.androidaps.utils.resources.ResourceHelper
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.powermock.modules.junit4.PowerMockRunner
@RunWith(PowerMockRunner::class)
class NSClientPluginTest : TestBase() {
private lateinit var nsClientSourcePlugin: NSClientSourcePlugin

View file

@ -3,16 +3,12 @@ package info.nightscout.androidaps.plugins.source
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.TestBase
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.utils.resources.ResourceHelper
import org.junit.Assert
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.Mock
import org.powermock.modules.junit4.PowerMockRunner
@RunWith(PowerMockRunner::class)
class XdripPluginTest : TestBase() {
private lateinit var xdripPlugin: XdripPlugin

View file

@ -4,17 +4,11 @@ import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.TestBaseWithProfile
import info.nightscout.androidaps.database.AppRepository
import info.nightscout.androidaps.utils.FabricPrivacy
import info.nightscout.androidaps.utils.sharedPreferences.SP
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.Mock
import org.powermock.core.classloader.annotations.PrepareForTest
import org.powermock.modules.junit4.PowerMockRunner
@Suppress("SpellCheckingInspection")
@RunWith(PowerMockRunner::class)
@PrepareForTest(FabricPrivacy::class, AppRepository::class)
class TreatmentsPluginTest : TestBaseWithProfile() {
@Mock lateinit var sp: SP

View file

@ -19,11 +19,9 @@ import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker
import info.nightscout.androidaps.plugins.general.maintenance.PrefFileListProvider
import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpPlugin
import info.nightscout.androidaps.queue.commands.*
import info.nightscout.androidaps.utils.DateUtil
import info.nightscout.androidaps.utils.FabricPrivacy
import info.nightscout.androidaps.utils.ToastUtils
import info.nightscout.androidaps.utils.buildHelper.BuildHelper
import info.nightscout.androidaps.utils.buildHelper.ConfigImpl
import info.nightscout.androidaps.utils.resources.ResourceHelper
@ -33,19 +31,11 @@ import io.reactivex.Single
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.mockito.Mockito.anyLong
import org.powermock.core.classloader.annotations.PrepareForTest
import org.powermock.modules.junit4.PowerMockRunner
import java.util.*
@RunWith(PowerMockRunner::class)
@PrepareForTest(
ConstraintChecker::class, VirtualPumpPlugin::class, ToastUtils::class, Context::class,
FabricPrivacy::class, PrefFileListProvider::class, PowerManager::class,
AppRepository::class)
class CommandQueueTest : TestBaseWithProfile() {
@Mock lateinit var constraintChecker: ConstraintChecker

View file

@ -13,27 +13,17 @@ import info.nightscout.androidaps.interfaces.PumpDescription
import info.nightscout.androidaps.interfaces.PumpSync
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker
import info.nightscout.androidaps.plugins.general.maintenance.PrefFileListProvider
import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpPlugin
import info.nightscout.androidaps.queue.commands.Command
import info.nightscout.androidaps.queue.commands.CommandTempBasalAbsolute
import info.nightscout.androidaps.utils.FabricPrivacy
import info.nightscout.androidaps.utils.ToastUtils
import info.nightscout.androidaps.utils.buildHelper.BuildHelper
import info.nightscout.androidaps.utils.buildHelper.ConfigImpl
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
import org.powermock.core.classloader.annotations.PrepareForTest
import org.powermock.modules.junit4.PowerMockRunner
@RunWith(PowerMockRunner::class)
@PrepareForTest(
ConstraintChecker::class, VirtualPumpPlugin::class, ToastUtils::class, Context::class,
FabricPrivacy::class, PrefFileListProvider::class, PowerManager::class)
class QueueThreadTest : TestBaseWithProfile() {
@Mock lateinit var constraintChecker: ConstraintChecker

View file

@ -3,14 +3,8 @@ package info.nightscout.androidaps.utils
import info.nightscout.androidaps.TestBase
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.Mock
import org.powermock.core.classloader.annotations.PrepareForTest
import org.powermock.modules.junit4.PowerMockRunner
@RunWith(PowerMockRunner::class)
@PrepareForTest(DateUtil::class)
class SntpClientTest : TestBase() {
@Mock lateinit var dateUtil: DateUtil

View file

@ -17,16 +17,11 @@ import info.nightscout.androidaps.utils.DateUtil
import info.nightscout.androidaps.utils.resources.ResourceHelper
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.Mock
import org.mockito.Mockito
import org.mockito.Mockito.`when`
import org.mockito.invocation.InvocationOnMock
import org.powermock.core.classloader.annotations.PrepareForTest
import org.powermock.modules.junit4.PowerMockRunner
@RunWith(PowerMockRunner::class)
@PrepareForTest(ConstraintChecker::class, VirtualPumpPlugin::class, DateUtil::class, AutosensDataStore::class)
class BolusWizardTest : TestBase() {
private val pumpBolusStep = 0.1

View file

@ -1,6 +1,7 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-allopen'
apply plugin: 'com.hiya.jacoco-android'
apply from: "${project.rootDir}/gradle/android_dependencies.gradle"

View file

@ -5,6 +5,7 @@ import android.os.Handler
import android.os.HandlerThread
import android.os.SystemClock
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.annotations.OpenForTesting
import info.nightscout.androidaps.automation.R
import info.nightscout.androidaps.events.*
import info.nightscout.androidaps.interfaces.Config
@ -38,6 +39,7 @@ import javax.inject.Inject
import javax.inject.Singleton
import kotlin.collections.ArrayList
@OpenForTesting
@Singleton
class AutomationPlugin @Inject constructor(
injector: HasAndroidInjector,

View file

@ -1,13 +1,11 @@
package info.nightscout.androidaps.services
import android.location.Location
import info.nightscout.androidaps.annotations.OpenForTesting
import javax.inject.Inject
import javax.inject.Singleton
/**
* Created by adrian on 2020-01-06.
*/
@OpenForTesting
@Singleton
class LastLocationDataContainer @Inject constructor() {
var lastLocation: Location? = null

View file

@ -14,11 +14,8 @@ import info.nightscout.androidaps.utils.resources.ResourceHelper
import org.json.JSONObject
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.Mock
import org.powermock.modules.junit4.PowerMockRunner
@RunWith(PowerMockRunner::class)
class AutomationEventTest : TestBase() {
@Mock lateinit var loopPlugin: Loop
@ -48,7 +45,6 @@ class AutomationEventTest : TestBase() {
val event = AutomationEvent(injector)
event.title = "Test"
event.trigger = TriggerDummy(injector).instantiate(JSONObject(TriggerConnectorTest.oneItem))
?: throw Exception()
event.addAction(ActionLoopEnable(injector))
// export to json

View file

@ -8,12 +8,7 @@ import info.nightscout.androidaps.plugins.general.automation.triggers.TriggerCon
import info.nightscout.androidaps.plugins.general.automation.triggers.TriggerDummy
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
import org.powermock.core.classloader.annotations.PrepareForTest
import org.powermock.modules.junit4.PowerMockRunner
@RunWith(PowerMockRunner::class)
@PrepareForTest
class ComposeTriggerTest : TestBase() {
var injector: HasAndroidInjector = HasAndroidInjector { AndroidInjector { } }

View file

@ -19,10 +19,8 @@ import info.nightscout.androidaps.utils.resources.ResourceHelper
import org.json.JSONObject
import org.junit.Before
import org.mockito.Mock
import org.powermock.core.classloader.annotations.PrepareForTest
@Suppress("SpellCheckingInspection")
@PrepareForTest(FabricPrivacy::class, AppRepository::class)
open class TestBaseWithProfile : TestBase() {
@Mock lateinit var activePluginProvider: ActivePlugin

View file

@ -15,15 +15,10 @@ import info.nightscout.androidaps.utils.resources.ResourceHelper
import org.junit.Assert
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.ArgumentMatchers
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(RxBusWrapper::class, TimerUtil::class)
class ActionAlarmTest : TestBase() {
@Mock lateinit var resourceHelper: ResourceHelper

View file

@ -1,20 +1,15 @@
package info.nightscout.androidaps.plugins.general.automation.actions
import info.nightscout.androidaps.automation.R
import info.nightscout.androidaps.interfaces.PluginBase
import info.nightscout.androidaps.interfaces.PluginType
import info.nightscout.androidaps.interfaces.PumpDescription
import info.nightscout.androidaps.queue.Callback
import org.junit.Assert
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.ArgumentMatchers.eq
import org.mockito.Mockito
import org.mockito.Mockito.`when`
import org.powermock.modules.junit4.PowerMockRunner
@RunWith(PowerMockRunner::class)
class ActionLoopDisableTest : ActionsTestBase() {
lateinit var sut: ActionLoopDisable

View file

@ -1,18 +1,14 @@
package info.nightscout.androidaps.plugins.general.automation.actions
import info.nightscout.androidaps.automation.R
import info.nightscout.androidaps.interfaces.PluginBase
import info.nightscout.androidaps.interfaces.PluginType
import info.nightscout.androidaps.queue.Callback
import org.junit.Assert
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.Mockito
import org.mockito.Mockito.`when`
import org.powermock.modules.junit4.PowerMockRunner
@RunWith(PowerMockRunner::class)
class ActionLoopEnableTest : ActionsTestBase() {
lateinit var sut: ActionLoopEnable

View file

@ -9,11 +9,8 @@ import io.reactivex.Single
import org.junit.Assert
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.Mockito.`when`
import org.powermock.modules.junit4.PowerMockRunner
@RunWith(PowerMockRunner::class)
class ActionLoopResumeTest : ActionsTestBase() {
lateinit var sut: ActionLoopResume

View file

@ -6,13 +6,10 @@ import info.nightscout.androidaps.queue.Callback
import org.junit.Assert
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.ArgumentMatchers
import org.mockito.Mockito
import org.mockito.Mockito.`when`
import org.powermock.modules.junit4.PowerMockRunner
@RunWith(PowerMockRunner::class)
class ActionLoopSuspendTest : ActionsTestBase() {
lateinit var sut: ActionLoopSuspend

View file

@ -6,23 +6,26 @@ import info.nightscout.androidaps.TestBase
import info.nightscout.androidaps.automation.R
import info.nightscout.androidaps.data.PumpEnactResult
import info.nightscout.androidaps.database.AppRepository
import info.nightscout.androidaps.database.transactions.CancelCurrentTemporaryTargetIfAnyTransaction
import info.nightscout.androidaps.database.transactions.InsertAndCancelCurrentTemporaryTargetTransaction
import info.nightscout.androidaps.database.transactions.InsertTherapyEventAnnouncementTransaction
import info.nightscout.androidaps.database.transactions.Transaction
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.general.automation.elements.InputString
import info.nightscout.androidaps.queue.Callback
import info.nightscout.androidaps.utils.resources.ResourceHelper
import io.reactivex.Completable
import io.reactivex.Single
import org.junit.Assert
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.ArgumentMatchers
import org.mockito.Mock
import org.mockito.Mockito
import org.mockito.Mockito.`when`
import org.powermock.core.classloader.annotations.PrepareForTest
import org.powermock.modules.junit4.PowerMockRunner
import org.mockito.Mockito.any
import org.mockito.Mockito.doNothing
@RunWith(PowerMockRunner::class)
@PrepareForTest(RxBusWrapper::class)
class ActionNotificationTest : TestBase() {
@Mock lateinit var resourceHelper: ResourceHelper
@ -47,7 +50,14 @@ class ActionNotificationTest : TestBase() {
fun setup() {
`when`(resourceHelper.gs(R.string.ok)).thenReturn("OK")
`when`(resourceHelper.gs(R.string.notification)).thenReturn("Notification")
`when`(resourceHelper.gs(ArgumentMatchers.eq(R.string.notification_message), ArgumentMatchers.anyString())).thenReturn("Notification: %s")
`when`(
resourceHelper.gs(
ArgumentMatchers.eq(R.string.notification_message),
ArgumentMatchers.anyString()
)
).thenReturn("Notification: %s")
`when`(repository.runTransaction(anyObject<Transaction<InsertTherapyEventAnnouncementTransaction.TransactionResult>>()))
.thenReturn(Completable.fromAction {})
sut = ActionNotification(injector)
}
@ -81,7 +91,10 @@ class ActionNotificationTest : TestBase() {
@Test fun toJSONTest() {
sut.text = InputString("Asd")
Assert.assertEquals("{\"data\":{\"text\":\"Asd\"},\"type\":\"info.nightscout.androidaps.plugins.general.automation.actions.ActionNotification\"}", sut.toJSON())
Assert.assertEquals(
"{\"data\":{\"text\":\"Asd\"},\"type\":\"info.nightscout.androidaps.plugins.general.automation.actions.ActionNotification\"}",
sut.toJSON()
)
}
@Test fun fromJSONTest() {

View file

@ -7,12 +7,9 @@ import info.nightscout.androidaps.queue.Callback
import org.junit.Assert
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.Mockito
import org.mockito.Mockito.`when`
import org.powermock.modules.junit4.PowerMockRunner
@RunWith(PowerMockRunner::class)
class ActionProfileSwitchPercentTest : ActionsTestBase() {
private lateinit var sut: ActionProfileSwitchPercent

View file

@ -6,16 +6,13 @@ import info.nightscout.androidaps.queue.Callback
import org.junit.Assert
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.ArgumentMatchers
import org.mockito.ArgumentMatchers.anyLong
import org.mockito.Mockito
import org.mockito.Mockito.`when`
import org.mockito.Mockito.anyInt
import org.mockito.Mockito.anyString
import org.powermock.modules.junit4.PowerMockRunner
@RunWith(PowerMockRunner::class)
class ActionProfileSwitchTest : ActionsTestBase() {
private lateinit var sut: ActionProfileSwitch

View file

@ -6,13 +6,10 @@ import info.nightscout.androidaps.queue.Callback
import org.junit.Assert
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.ArgumentMatchers.anyString
import org.mockito.ArgumentMatchers.eq
import org.mockito.Mockito.`when`
import org.powermock.modules.junit4.PowerMockRunner
@RunWith(PowerMockRunner::class)
class ActionSendSMSTest : ActionsTestBase() {
private lateinit var sut: ActionSendSMS

View file

@ -12,12 +12,9 @@ import io.reactivex.Single
import org.junit.Assert
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.Mockito
import org.mockito.Mockito.`when`
import org.powermock.modules.junit4.PowerMockRunner
@RunWith(PowerMockRunner::class)
class ActionStartTempTargetTest : ActionsTestBase() {
private lateinit var sut: ActionStartTempTarget

View file

@ -9,12 +9,9 @@ import io.reactivex.Single
import org.junit.Assert
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.Mockito
import org.mockito.Mockito.`when`
import org.powermock.modules.junit4.PowerMockRunner
@RunWith(PowerMockRunner::class)
class ActionStopTempTargetTest : ActionsTestBase() {
private lateinit var sut: ActionStopTempTarget

View file

@ -3,12 +3,7 @@ package info.nightscout.androidaps.plugins.general.automation.actions
import org.json.JSONObject
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
import org.powermock.core.classloader.annotations.PrepareForTest
import org.powermock.modules.junit4.PowerMockRunner
@RunWith(PowerMockRunner::class)
@PrepareForTest
class ActionTest : ActionsTestBase() {
@Test

Some files were not shown because too many files have changed in this diff Show more