use of org.robolectric.internal.AndroidSandbox.TestEnvironmentSpec in project robolectric by robolectric.
the class RobolectricTestRunnerTest method failureInResetterDoesntBreakAllTests.
@Test
public void failureInResetterDoesntBreakAllTests() throws Exception {
RobolectricTestRunner runner = new SingleSdkRobolectricTestRunner(TestWithTwoMethods.class, SingleSdkRobolectricTestRunner.defaultInjector().bind(TestEnvironmentSpec.class, new TestEnvironmentSpec(AndroidTestEnvironmentWithFailingSetUp.class)).build());
runner.run(notifier);
assertThat(events).containsExactly("started: first", "failure: fake error in setUpApplicationState", "finished: first", "started: second", "failure: fake error in setUpApplicationState", "finished: second").inOrder();
}
Aggregations