org.jbehave.core.junit
Class AnnotatedPathRunner

java.lang.Object
  extended by org.junit.runner.Runner
      extended by org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
          extended by org.junit.runners.BlockJUnit4ClassRunner
              extended by org.jbehave.core.junit.AnnotatedEmbedderRunner
                  extended by org.jbehave.core.junit.AnnotatedPathRunner
All Implemented Interfaces:
org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Sortable

public class AnnotatedPathRunner
extends AnnotatedEmbedderRunner

A JUnit Runner that uses a UsingPaths annotation to specify which story paths to run and uses the RunNotifier to provide a Description for each. The story description uses a StoryNameResolver (overridable via the storyNameResolver() method) to resolve the story path to a name.


Constructor Summary
AnnotatedPathRunner(Class<?> annotatedClass)
          Class constructor.
 
Method Summary
protected  void collectInitializationErrors(List<Throwable> errors)
           
 org.junit.runner.Description getDescription()
           
 void run(org.junit.runner.notification.RunNotifier notifier)
           
protected  StoryNameResolver storyNameResolver()
           
protected  void validateInstanceMethods(List<Throwable> errors)
           
 
Methods inherited from class org.jbehave.core.junit.AnnotatedEmbedderRunner
annotationBuilder, createTest, testClass
 
Methods inherited from class org.junit.runners.BlockJUnit4ClassRunner
computeTestMethods, describeChild, getChildren, methodBlock, methodInvoker, possiblyExpectingExceptions, runChild, testName, validateConstructor, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeout
 
Methods inherited from class org.junit.runners.ParentRunner
childrenInvoker, classBlock, filter, getName, getTestClass, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses
 
Methods inherited from class org.junit.runner.Runner
testCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotatedPathRunner

public AnnotatedPathRunner(Class<?> annotatedClass)
                    throws org.junit.runners.model.InitializationError
Class constructor.

Parameters:
annotatedClass - the annotated Class.
Throws:
org.junit.runners.model.InitializationError - if an error occurs.
Method Detail

storyNameResolver

protected StoryNameResolver storyNameResolver()

getDescription

public org.junit.runner.Description getDescription()
Specified by:
getDescription in interface org.junit.runner.Describable
Overrides:
getDescription in class org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>

collectInitializationErrors

protected void collectInitializationErrors(List<Throwable> errors)
Overrides:
collectInitializationErrors in class org.junit.runners.BlockJUnit4ClassRunner

validateInstanceMethods

protected void validateInstanceMethods(List<Throwable> errors)
Overrides:
validateInstanceMethods in class org.junit.runners.BlockJUnit4ClassRunner

run

public void run(org.junit.runner.notification.RunNotifier notifier)
Overrides:
run in class org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>


Copyright © 2003-2012. All Rights Reserved.