Fix tests

This commit is contained in:
Martin Fietz 2016-01-13 18:45:00 +01:00
parent f145a4db38
commit 065a1f9ae6
2 changed files with 6 additions and 4 deletions

View File

@ -49,10 +49,11 @@ public class PlaybackSonicTest extends ActivityInstrumentationTestCase2<MainActi
public void setUp() throws Exception { public void setUp() throws Exception {
super.setUp(); super.setUp();
PodDBAdapter.deleteDatabase();
context = getInstrumentation().getTargetContext(); context = getInstrumentation().getTargetContext();
PodDBAdapter.init(context);
PodDBAdapter.deleteDatabase();
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
prefs.edit() prefs.edit()
.clear() .clear()

View File

@ -46,10 +46,11 @@ public class PlaybackTest extends ActivityInstrumentationTestCase2<MainActivity>
public void setUp() throws Exception { public void setUp() throws Exception {
super.setUp(); super.setUp();
PodDBAdapter.deleteDatabase();
context = getInstrumentation().getTargetContext(); context = getInstrumentation().getTargetContext();
PodDBAdapter.init(context);
PodDBAdapter.deleteDatabase();
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
prefs.edit() prefs.edit()
.clear() .clear()