Fixed failing build

Replaced static method to obtain context with appropriate dependency
pull/234/merge
Anirudha Agashe 9 years ago committed by Alinson Xavier
parent 4fc30fae53
commit 54a195243d

@ -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