@Override public boolean assumptionViolated() { return super.assumptionViolated(); }
private boolean testAssumptionViolated() { return StepEventBus.getEventBus().assumptionViolated(); }
private void notifyAssumptionViolated(String message) { StepEventBus.getEventBus().assumptionViolated(message); }
private void notifyAssumptionViolated(String message) { StepEventBus.getEventBus().assumptionViolated(message); }
private void notifyAssumptionViolated(String message) { StepEventBus.getEventBus().assumptionViolated(message); }
private void checkForAssumptionViolations() { if (StepEventBus.getEventBus().assumptionViolated()) { throw new AssumptionViolatedException(StepEventBus.getEventBus().getAssumptionViolatedMessage()); } } }
public void failed(String stepTitle, Throwable cause) { Throwable rootCause = cause.getCause() != null ? cause.getCause() : cause; StepEventBus.getEventBus().updateCurrentStepTitle(stepTitle); if (isAssumptionFailure(rootCause)) { StepEventBus.getEventBus().assumptionViolated(rootCause.getMessage()); } else { StepEventBus.getEventBus().stepFailed(new StepFailure(ExecutedStepDescription.withTitle(normalized(stepTitle)), rootCause)); } }
@Override public void evaluate() throws Throwable { try { statement.evaluate(); } catch (AssumptionViolatedException e) { StepEventBus.getEventBus().assumptionViolated(e.getMessage()); } checkForStepFailures(); checkForAssumptionViolations(); }
@Override public void failed(String stepTitle, Throwable cause) { if (!StepEventBus.getEventBus().testSuiteHasStarted()) { declareOutOfSuiteFailure(); } if (!errorOrFailureRecordedForStep(cause.getCause())) { StepEventBus.getEventBus().updateCurrentStepTitle(stepTitle); Throwable rootCause = new RootCauseAnalyzer(cause.getCause()).getRootCause().toException(); if (isAssumptionFailure(rootCause)) { StepEventBus.getEventBus().assumptionViolated(rootCause.getMessage()); } else { StepEventBus.getEventBus().stepFailed(new StepFailure(ExecutedStepDescription.withTitle(normalized(stepTitle)), rootCause)); } } }
private void failed(String stepTitle, Throwable cause) { if (!errorOrFailureRecordedForStep(stepTitle, cause)) { if (!isEmpty(stepTitle)) { getStepEventBus(currentFeaturePath()).updateCurrentStepTitle(stepTitle); } Throwable rootCause = new RootCauseAnalyzer(cause).getRootCause().toException(); if (isAssumptionFailure(rootCause)) { getStepEventBus(currentFeaturePath()).assumptionViolated(rootCause.getMessage()); } else { getStepEventBus(currentFeaturePath()).stepFailed(new StepFailure(ExecutedStepDescription.withTitle(normalized(currentStepTitle())), rootCause)); } } }
private void failed(String stepTitle, Throwable cause) { if (!errorOrFailureRecordedForStep(stepTitle, cause)) { if (!isEmpty(stepTitle)) { getStepEventBus(currentFeaturePath()).updateCurrentStepTitle(stepTitle); } Throwable rootCause = new RootCauseAnalyzer(cause).getRootCause().toException(); if (isAssumptionFailure(rootCause)) { getStepEventBus(currentFeaturePath()).assumptionViolated(rootCause.getMessage()); } else { getStepEventBus(currentFeaturePath()).stepFailed(new StepFailure(ExecutedStepDescription.withTitle(normalized(currentStepTitle())), rootCause)); } } }