Fixed failing build

Replaced static method to obtain context with appropriate dependency
This commit is contained in:
Anirudha Agashe
2017-01-19 00:28:56 +05:30
committed by Alinson Xavier
parent 4fc30fae53
commit 54a195243d
3 changed files with 3 additions and 3 deletions

View File

@@ -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");

View File

@@ -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());

View File

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