use of io.cucumber.plugin.event.TestCaseFinished in project cucumber-jvm by cucumber.
the class TestCaseResultObserverTest method should_not_be_skipped_for_pending_result.
@Test
public void should_not_be_skipped_for_pending_result() {
TestCaseResultObserver resultListener = TestCaseResultObserver.observe(bus);
TestPendingException error = new TestPendingException();
Result stepResult = new Result(PENDING, ZERO, error);
bus.send(new TestStepFinished(now(), testCase, step, stepResult));
Result testCaseResult = new Result(PENDING, ZERO, error);
bus.send(new TestCaseFinished(now(), testCase, testCaseResult));
Exception exception = expectThrows(Exception.class, resultListener::assertTestCasePassed);
assertEquals(exception.getCause(), error);
}
Aggregations