mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
Fixed failing build
Replaced static method to obtain context with appropriate dependency
This commit is contained in:
@@ -225,7 +225,7 @@ public class BaseViewTest extends BaseAndroidTest
|
|||||||
throws IOException
|
throws IOException
|
||||||
{
|
{
|
||||||
File dir = FileUtils.getSDCardDir("test-screenshots");
|
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(
|
if (dir == null) throw new RuntimeException(
|
||||||
"Could not find suitable dir for screenshots");
|
"Could not find suitable dir for screenshots");
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public class ExportCSVTaskTest extends BaseAndroidTest
|
|||||||
for (Habit h : habitList) selected.add(h);
|
for (Habit h : habitList) selected.add(h);
|
||||||
|
|
||||||
taskRunner.execute(
|
taskRunner.execute(
|
||||||
new ExportCSVTask(testContext,habitList, selected, archiveFilename -> {
|
new ExportCSVTask(targetContext,habitList, selected, archiveFilename -> {
|
||||||
assertThat(archiveFilename, is(not(nullValue())));
|
assertThat(archiveFilename, is(not(nullValue())));
|
||||||
File f = new File(archiveFilename);
|
File f = new File(archiveFilename);
|
||||||
assertTrue(f.exists());
|
assertTrue(f.exists());
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public class ExportDBTaskTest extends BaseAndroidTest
|
|||||||
@Test
|
@Test
|
||||||
public void testExportCSV() throws Throwable
|
public void testExportCSV() throws Throwable
|
||||||
{
|
{
|
||||||
ExportDBTask task = new ExportDBTask(testContext, filename -> {
|
ExportDBTask task = new ExportDBTask(targetContext, filename -> {
|
||||||
assertThat(filename, is(not(nullValue())));
|
assertThat(filename, is(not(nullValue())));
|
||||||
|
|
||||||
File f = new File(filename);
|
File f = new File(filename);
|
||||||
|
|||||||
Reference in New Issue
Block a user