Search in sources :

Example 21 with TestCaseStarted

use of io.cucumber.plugin.event.TestCaseStarted in project cucumber-jvm by cucumber.

the class CanonicalEventOrderTest method createTestCaseEvent.

private static TestCaseStarted createTestCaseEvent(Instant instant, URI uri, int line) {
    final TestCase testCase = mock(TestCase.class);
    given(testCase.getUri()).willReturn(uri);
    given(testCase.getLocation()).willReturn(new Location(line, -1));
    return new TestCaseStarted(instant, testCase);
}
Also used : TestCase(io.cucumber.plugin.event.TestCase) TestCaseStarted(io.cucumber.plugin.event.TestCaseStarted) Location(io.cucumber.plugin.event.Location)

Aggregations

TestCaseStarted (io.cucumber.plugin.event.TestCaseStarted)21 Test (org.junit.jupiter.api.Test)18 Result (io.cucumber.plugin.event.Result)16 TestCaseFinished (io.cucumber.plugin.event.TestCaseFinished)16 TestStepStarted (io.cucumber.plugin.event.TestStepStarted)16 TestStepFinished (io.cucumber.plugin.event.TestStepFinished)15 Failure (org.junit.runner.notification.Failure)7 CucumberException (io.cucumber.core.exception.CucumberException)4 AssumptionViolatedException (org.junit.AssumptionViolatedException)4 TestAbortedException (org.opentest4j.TestAbortedException)4 SnippetsSuggestedEvent (io.cucumber.plugin.event.SnippetsSuggestedEvent)3 Suggestion (io.cucumber.plugin.event.SnippetsSuggestedEvent.Suggestion)3 MultipleFailureException (org.junit.runners.model.MultipleFailureException)3 Location (io.cucumber.plugin.event.Location)2 TestCase (io.cucumber.plugin.event.TestCase)2 EventBus (io.cucumber.core.eventbus.EventBus)1 ExceptionUtils.printStackTrace (io.cucumber.core.exception.ExceptionUtils.printStackTrace)1 TimeServiceEventBus (io.cucumber.core.runtime.TimeServiceEventBus)1 Envelope (io.cucumber.messages.types.Envelope)1 EventListener (io.cucumber.plugin.EventListener)1