pull/312/head
Alinson S. Xavier 8 years ago
parent 38d3b0d047
commit bb282da92d

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

Loading…
Cancel
Save