use of io.cucumber.plugin.event.Result in project cucumber-jvm by cucumber.
the class ResultTest method passed_result_is_ok.
@Test
void passed_result_is_ok() {
Result passedResult = new Result(PASSED, ZERO, null);
assertTrue(passedResult.getStatus().isOk());
}
use of io.cucumber.plugin.event.Result in project cucumber-jvm by cucumber.
the class TestCaseStateResultTest method failed_followed_by_pending_yields_failed_error.
@Test
void failed_followed_by_pending_yields_failed_error() {
Throwable failedError = mock(Throwable.class);
Throwable pendingError = mock(Throwable.class);
s.add(new Result(Status.FAILED, ZERO, failedError));
s.add(new Result(Status.PENDING, ZERO, pendingError));
assertThat(s.getError(), sameInstance(failedError));
}
use of io.cucumber.plugin.event.Result in project cucumber-jvm by cucumber.
the class TestCaseStateResultTest method passed_failed_pending_undefined_skipped_is_failed.
@Test
void passed_failed_pending_undefined_skipped_is_failed() {
s.add(new Result(Status.PASSED, ZERO, null));
s.add(new Result(Status.FAILED, ZERO, null));
s.add(new Result(Status.PENDING, ZERO, null));
s.add(new Result(Status.UNDEFINED, ZERO, null));
s.add(new Result(Status.SKIPPED, ZERO, null));
assertAll(() -> assertThat(s.getStatus(), is(equalTo(FAILED))), () -> assertTrue(s.isFailed()));
}
use of io.cucumber.plugin.event.Result in project cucumber-jvm by cucumber.
the class TestCaseStateResultTest method passed_pending_undefined_skipped_is_pending.
@Test
void passed_pending_undefined_skipped_is_pending() {
s.add(new Result(Status.PASSED, ZERO, null));
s.add(new Result(Status.UNDEFINED, ZERO, null));
s.add(new Result(Status.PENDING, ZERO, null));
s.add(new Result(Status.SKIPPED, ZERO, null));
assertAll(() -> assertThat(s.getStatus(), is(equalTo(UNDEFINED))), () -> assertFalse(s.isFailed()));
}
use of io.cucumber.plugin.event.Result in project cucumber-jvm by cucumber.
the class TestCaseStateResultTest method pending_followed_by_failed_yields_failed_error.
@Test
void pending_followed_by_failed_yields_failed_error() {
Throwable pendingError = mock(Throwable.class);
Throwable failedError = mock(Throwable.class);
s.add(new Result(Status.PENDING, ZERO, pendingError));
s.add(new Result(Status.FAILED, ZERO, failedError));
assertThat(s.getError(), sameInstance(failedError));
}
Aggregations