fixed exception in tests

pull/236/head
AnirudhaAgashe 9 years ago
parent e4f41560fc
commit 488ff3fd28

@ -225,7 +225,7 @@ public class BaseViewTest extends BaseAndroidTest
throws IOException
{
File dir = FileUtils.getSDCardDir("test-screenshots");
if (dir == null) dir = FileUtils.getFilesDir(testContext,"test-screenshots");
if (dir == null) dir = FileUtils.getFilesDir(targetContext,"test-screenshots");
if (dir == null) throw new RuntimeException(
"Could not find suitable dir for screenshots");

@ -56,7 +56,7 @@ public class ExportCSVTaskTest extends BaseAndroidTest
for (Habit h : habitList) selected.add(h);
taskRunner.execute(
new ExportCSVTask(testContext,habitList, selected, archiveFilename -> {
new ExportCSVTask(targetContext,habitList, selected, archiveFilename -> {
assertThat(archiveFilename, is(not(nullValue())));
File f = new File(archiveFilename);
assertTrue(f.exists());

@ -46,7 +46,7 @@ public class ExportDBTaskTest extends BaseAndroidTest
@Test
public void testExportCSV() throws Throwable
{
ExportDBTask task = new ExportDBTask(testContext, filename -> {
ExportDBTask task = new ExportDBTask(targetContext, filename -> {
assertThat(filename, is(not(nullValue())));
File f = new File(filename);

Loading…
Cancel
Save