Skip to content

Commit e326bcd

Browse files
committed
Update samples
1 parent 686a511 commit e326bcd

4 files changed

Lines changed: 47 additions & 2 deletions

File tree

compatibility/src/test/java/io/cucumber/compatibility/CompatibilityTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,11 @@ final class CompatibilityTest {
7171
"global-hooks-afterall-error",
7272
"global-hooks-attachments",
7373
"global-hooks-beforeall-error",
74-
// exception: cucumber can't test runs intentionally
75-
"test-run-exception");
74+
// exception: Cucumber JVM can't fail test runs intentionally
75+
"test-run-exception",
76+
// exception: Cucumber JVM does not continue after any failed step
77+
"failedish-combinations"
78+
);
7679

7780
private static final Map<String, Map<Pattern, Matcher<?>>> divergingExpectations = createDivergingExpectations();
7881

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package io.cucumber.compatibility.pendingexception;
2+
3+
import io.cucumber.java.en.Given;
4+
5+
public final class PendingException {
6+
7+
@Given("an unimplemented pending step")
8+
public void anUnimplementedPendingStep() {
9+
throw new io.cucumber.java.PendingException("TODO");
10+
}
11+
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package io.cucumber.compatibility.skippedexception;
2+
3+
import io.cucumber.java.en.And;
4+
import org.junit.jupiter.api.Assumptions;
5+
6+
public final class SkippedException {
7+
8+
@And("I skip a step")
9+
public void iSkipAStep() {
10+
Assumptions.abort("skipping");
11+
}
12+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package io.cucumber.compatibility.skippedfailinghook.skipped;
2+
3+
import io.cucumber.java.After;
4+
import io.cucumber.java.en.And;
5+
import org.junit.jupiter.api.Assumptions;
6+
7+
public final class SkippedFailingHook {
8+
9+
@And("a step that skips")
10+
public void aStepThatSkips() {
11+
Assumptions.abort();
12+
}
13+
14+
@After
15+
public void after() {
16+
throw new RuntimeException("whoops");
17+
}
18+
}

0 commit comments

Comments
 (0)