Search in sources :

Example 6 with AndroidPreferences

use of com.nightscout.android.preferences.AndroidPreferences in project android-uploader by nightscout.

the class AndroidBarcodeTest method setUp.

@Before
public void setUp() {
    activity = Robolectric.buildActivity(SettingsActivity.class).create().get();
    sharedPrefs = ShadowPreferenceManager.getDefaultSharedPreferences(Robolectric.application.getApplicationContext());
    prefs = new AndroidPreferences(activity.getApplicationContext(), sharedPrefs);
}
Also used : AndroidPreferences(com.nightscout.android.preferences.AndroidPreferences) SettingsActivity(com.nightscout.android.settings.SettingsActivity) Before(org.junit.Before)

Example 7 with AndroidPreferences

use of com.nightscout.android.preferences.AndroidPreferences in project android-uploader by nightscout.

the class MainActivityTest method setUp.

@Before
public void setUp() {
    activityController = Robolectric.buildActivity(MainActivity.class);
    preferences = new AndroidPreferences(getContext());
    MockitoAnnotations.initMocks(this);
}
Also used : AndroidPreferences(com.nightscout.android.preferences.AndroidPreferences) Before(org.junit.Before)

Aggregations

AndroidPreferences (com.nightscout.android.preferences.AndroidPreferences)7 Before (org.junit.Before)3 Intent (android.content.Intent)2 HitBuilders (com.google.android.gms.analytics.HitBuilders)2 NightscoutPreferences (com.nightscout.core.preferences.NightscoutPreferences)2 SuppressLint (android.annotation.SuppressLint)1 AlertDialog (android.app.AlertDialog)1 PendingIntent (android.app.PendingIntent)1 DialogInterface (android.content.DialogInterface)1 IntentFilter (android.content.IntentFilter)1 PowerManager (android.os.PowerManager)1 WebSettings (android.webkit.WebSettings)1 Tracker (com.google.android.gms.analytics.Tracker)1 IntentResult (com.google.zxing.integration.android.IntentResult)1 CdcAcmSerialDriver (com.nightscout.android.drivers.USB.CdcAcmSerialDriver)1 SettingsActivity (com.nightscout.android.settings.SettingsActivity)1 Uploader (com.nightscout.android.upload.Uploader)1 Pebble (com.nightscout.android.wearables.Pebble)1 NSBarcodeConfig (com.nightscout.core.barcode.NSBarcodeConfig)1 CRCFailError (com.nightscout.core.dexcom.CRCFailError)1