Skip to content

Commit

Permalink
Revert "Fix #3141 #2920 - Make Junit recognise and report assertion f…
Browse files Browse the repository at this point in the history
…ailures (#3158)" (#3180)

This reverts commit c32b68e.
  • Loading branch information
wakaleo authored Jul 10, 2023
1 parent c32b68e commit dd31bcf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,6 @@ public static void throwExceptionsImmediately() {
throwExceptionsImmediately = true;
}

public static boolean shouldThrowExceptionsImmediately() {
return throwExceptionsImmediately = true;
}

public static boolean shouldThrowErrorsImmediately() {
return throwExceptionsImmediately;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ private void notifyOfStepFailure(final Object object, final Method method, final
else {
StepEventBus.getParallelEventBus().stepFailed(failure);
}
if (shouldThrowExceptionsImmediately()) {
if (shouldThrowExceptionImmediately()) {
finishAnyCucumberSteps();
throw cause;
}
Expand All @@ -623,8 +623,8 @@ private void finishAnyCucumberSteps() {
}
}

private boolean shouldThrowExceptionsImmediately() {
return Serenity.shouldThrowExceptionsImmediately();
private boolean shouldThrowExceptionImmediately() {
return Serenity.shouldThrowErrorsImmediately();
}

private void notifyStepStarted(final Object object, final Method method, final Object[] args) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package net.serenitybdd.junit5.samples.integration.displayName;

import net.serenitybdd.junit5.SerenityJUnit5Extension;
import net.serenitybdd.junit5.samples.integration.displayName.steps.TestExample;
import net.thucydides.core.annotations.Steps;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.DisplayNameGeneration;
import org.junit.jupiter.api.DisplayNameGenerator;
import org.junit.jupiter.api.Test;
Expand All @@ -13,16 +12,11 @@
@DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class)
public class JUnit5DisplayNameExample {

@Steps
TestExample testExample;


@Test
void test_spaces_ok() {
}

@Test
void test_spaces_fail() {
testExample.test_spaces_fail();
}
}

This file was deleted.

0 comments on commit dd31bcf

Please sign in to comment.