use of org.robolectric.RobolectricTestRunner in project robolectric by robolectric.
the class FailureListener method runTests.
@Nonnull
public static List<Failure> runTests(Class<?> testClass) throws InitializationError {
RunNotifier notifier = new RunNotifier();
FailureListener failureListener = new FailureListener();
notifier.addListener(failureListener);
new RobolectricTestRunner(testClass).run(notifier);
return failureListener.failures;
}
Aggregations