mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 17:18:52 -06:00
Fix tests
This commit is contained in:
@@ -54,7 +54,7 @@ public class BaseAndroidUnitTest
|
|||||||
|
|
||||||
modelFactory = new MemoryModelFactory();
|
modelFactory = new MemoryModelFactory();
|
||||||
habitList = spy(modelFactory.buildHabitList());
|
habitList = spy(modelFactory.buildHabitList());
|
||||||
fixtures = new HabitFixtures(modelFactory);
|
fixtures = new HabitFixtures(modelFactory, habitList);
|
||||||
taskRunner = new SingleThreadTaskRunner();
|
taskRunner = new SingleThreadTaskRunner();
|
||||||
commandRunner = new CommandRunner(taskRunner);
|
commandRunner = new CommandRunner(taskRunner);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,6 +139,11 @@ public class BaseUnitTest
|
|||||||
if (file.exists() && file.canRead()) in = new FileInputStream(file);
|
if (file.exists() && file.canRead()) in = new FileInputStream(file);
|
||||||
if (in != null) return in;
|
if (in != null) return in;
|
||||||
|
|
||||||
|
basePath = "src/test/resources/";
|
||||||
|
file = new File(basePath + assetPath);
|
||||||
|
if (file.exists() && file.canRead()) in = new FileInputStream(file);
|
||||||
|
if (in != null) return in;
|
||||||
|
|
||||||
throw new IllegalStateException("asset not found: " + assetPath);
|
throw new IllegalStateException("asset not found: " + assetPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user