Fix tests

This commit is contained in:
2017-06-23 16:25:25 -04:00
parent 38d3b0d047
commit bb282da92d
2 changed files with 6 additions and 1 deletions

View File

@@ -54,7 +54,7 @@ public class BaseAndroidUnitTest
modelFactory = new MemoryModelFactory();
habitList = spy(modelFactory.buildHabitList());
fixtures = new HabitFixtures(modelFactory);
fixtures = new HabitFixtures(modelFactory, habitList);
taskRunner = new SingleThreadTaskRunner();
commandRunner = new CommandRunner(taskRunner);
}

View File

@@ -139,6 +139,11 @@ public class BaseUnitTest
if (file.exists() && file.canRead()) in = new FileInputStream(file);
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);
}