use of io.cucumber.plugin.event.TestCase in project cucumber-jvm by cucumber.
the class Stats method addScenario.
private void addScenario(TestCaseFinished event) {
TestCase testCase = event.getTestCase();
addScenario(event.getResult().getStatus(), testCase);
}
use of io.cucumber.plugin.event.TestCase in project cucumber-jvm by cucumber.
the class Stats method printScenarios.
private void printScenarios(PrintStream out, List<TestCase> scenarios, Status type) {
Format format = formats.get(type.name().toLowerCase(ROOT));
if (!scenarios.isEmpty()) {
out.println(format.text(firstLetterCapitalizedName(type) + " scenarios:"));
}
for (TestCase scenario : scenarios) {
String location = scenario.getUri() + ":" + scenario.getLocation().getLine();
out.println(location + " # " + scenario.getName());
}
if (!scenarios.isEmpty()) {
out.println();
}
}
use of io.cucumber.plugin.event.TestCase 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);
}
Aggregations