void runTestMethod(Statement methodInvoker, RunNotifier notifier) {
    Description methodDescription = describeMethod();
    Description methodWithParams = findChildForParams(methodInvoker, methodDescription);

    notifier.fireTestStarted(methodWithParams);
    runMethodInvoker(notifier, methodDescription, methodInvoker, methodWithParams);
    notifier.fireTestFinished(methodWithParams);
  }
 public void afterScenario() {
   notifier.fireTestFinished(currentScenario);
   if (scenarioDescriptions.hasNext()) {
     currentScenario = scenarioDescriptions.next();
     finishedDescriptions.clear();
   }
 }
 private void runMethodInvoker(
     RunNotifier notifier,
     Description description,
     Statement methodInvoker,
     Description methodWithParams) {
   try {
     methodInvoker.evaluate();
   } catch (Throwable e) {
     notifier.fireTestFailure(new Failure(methodWithParams, e));
   }
 }
 public void successful(String step) {
   currentStep = getStepDescription(step);
   notifier.fireTestStarted(currentStep);
   notifier.fireTestFinished(currentStep);
   finishedDescriptions.add(currentStep);
 }
 public void failed(String step, Throwable e) {
   currentStep = getStepDescription(step);
   notifier.fireTestStarted(currentStep);
   notifier.fireTestFailure(new Failure(currentStep, e));
   finishedDescriptions.add(currentStep);
 }
 public void beforeStory(StoryDefinition story, boolean embeddedStory) {
   notifier.fireTestStarted(storyDescription);
 }
 public void beforeScenario(String title) {
   notifier.fireTestStarted(currentScenario);
 }
 public void afterStory(boolean embeddedStory) {
   notifier.fireTestFinished(storyDescription);
 }
 /** {@inheritDoc} */
 @Override
 public void run(RunNotifier notifier) {
   notifier.fireTestIgnored(getDescription());
 }
  private void reportTestAsNotApplicableInCurrentTestRun(Method method) {
    Class<?> testClass = method.getDeclaringClass();
    Description testDescription = Description.createTestDescription(testClass, method.getName());

    runNotifier.fireTestAssumptionFailed(new Failure(testDescription, NOT_APPLICABLE));
  }