Tabnine Logo
StepFailure.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
net.thucydides.core.steps.StepFailure
constructor

Best Java code snippets using net.thucydides.core.steps.StepFailure.<init> (Showing top 11 results out of 315)

origin: net.serenity-bdd/serenity-screenplay

public <T> void reportStepFailureFor(Consequence<T> consequence, Throwable e) {
  ExecutedStepDescription consequenceDescription = ExecutedStepDescription.withTitle(consequence.toString());
  StepEventBus.getEventBus().stepFailed(new StepFailure(consequenceDescription, e));
}
origin: net.serenity-bdd/serenity-journey

public void reportStepFailureFor(Performable todo, Throwable e) {
  ExecutedStepDescription taskDescription =  ExecutedStepDescription.of(todo.getClass(),"attemptsTo");
  StepEventBus.getEventBus().stepFailed(new StepFailure(taskDescription, e));
}
origin: net.serenity-bdd/serenity-screenplay

public void reportStepFailureFor(Performable todo, Throwable e) {
  ExecutedStepDescription taskDescription =  ExecutedStepDescription.of(todo.getClass(),"attemptsTo");
  StepEventBus.getEventBus().stepFailed(new StepFailure(taskDescription, e));
}
origin: net.serenity-bdd/serenity-journey

public <T> void reportStepFailureFor(Consequence<T> consequence, Throwable e) {
  ExecutedStepDescription consequenceDescription = ExecutedStepDescription.withTitle(consequence.toString());
  StepEventBus.getEventBus().stepFailed(new StepFailure(consequenceDescription, e));
}
origin: net.thucydides/thucydides-jbehave

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));
  }
}
origin: net.thucydides/thucydides-core

private void notifyOfStepFailure(final Method method, final Object[] args,
                 final Throwable cause) throws Throwable {
  ExecutedStepDescription description = ExecutedStepDescription.of(testStepClass, getTestNameFrom(method, args));
  StepFailure failure = new StepFailure(description, cause);
  StepEventBus.getEventBus().stepFailed(failure);
  if (shouldThrowExceptionImmediately()) {
    throw cause;
  }
}
origin: net.serenity-bdd/core

private void notifyOfStepFailure(final Method method, final Object[] args,
                 final Throwable cause) throws Throwable {
  ExecutedStepDescription description = ExecutedStepDescription.of(testStepClass, getTestNameFrom(method, args));
  StepFailure failure = new StepFailure(description, cause);
  StepEventBus.getEventBus().stepFailed(failure);
  if (shouldThrowExceptionImmediately()) {
    throw cause;
  }
}
origin: net.serenity-bdd/serenity-core

private void notifyOfStepFailure(final Object object, final Method method, final Object[] args,
                 final Throwable cause) throws Throwable {
  ExecutedStepDescription description = ExecutedStepDescription.of(testStepClass, getTestNameFrom(method, args), args)
      .withDisplayedFields(fieldValuesIn(object));
  StepFailure failure = new StepFailure(description, cause);
  StepEventBus.getEventBus().stepFailed(failure);
  if (shouldThrowExceptionImmediately()) {
    throw cause;
  }
}
origin: net.serenity-bdd/serenity-jbehave

@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));
    }
  }
}
origin: serenity-bdd/serenity-cucumber

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));
    }
  }
}
origin: net.serenity-bdd/serenity-cucumber

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));
    }
  }
}
net.thucydides.core.stepsStepFailure<init>

Popular methods of StepFailure

  • getException
  • getMessage
  • getExceptionClass

Popular in Java

  • Making http requests using okhttp
  • getSupportFragmentManager (FragmentActivity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • findViewById (Activity)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Collectors (java.util.stream)
  • JList (javax.swing)
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now