Package au.com.origin.snapshots.junit4
Class SnapshotRunner
java.lang.Object
org.junit.runner.Runner
org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
org.junit.runners.BlockJUnit4ClassRunner
au.com.origin.snapshots.junit4.SnapshotRunner
- All Implemented Interfaces:
org.junit.runner.Describable,org.junit.runner.manipulation.Filterable,org.junit.runner.manipulation.Sortable
public class SnapshotRunner
extends org.junit.runners.BlockJUnit4ClassRunner
Runner to enable java-snapshot-testing
If you are already using @RunWith for something else such as @RunWith(Parameterized.class) use these Rules instead.
- See Also:
-
SnapshotClassRule
Loosely based on: https://stackoverflow.com/questions/27745691/how-to-combine-runwith-with-runwithparameterized-class{@literal @}ClassRule public static SnapshotClassRule snapshotClassRule = new SnapshotClassRule(); {@literal @}Rule public SnapshotRule snapshotRule = new SnapshotRule(snapshotClassRule); private Expect expect;
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.junit.runners.model.StatementmethodInvoker(org.junit.runners.model.FrameworkMethod method, Object test) voidrun(org.junit.runner.notification.RunNotifier notifier) protected voidvalidateTestMethods(List<Throwable> errors) Methods inherited from class org.junit.runners.BlockJUnit4ClassRunner
collectInitializationErrors, computeTestMethods, createTest, describeChild, getChildren, getTestRules, isIgnored, methodBlock, possiblyExpectingExceptions, rules, runChild, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeoutMethods inherited from class org.junit.runners.ParentRunner
childrenInvoker, classBlock, classRules, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClassesMethods inherited from class org.junit.runner.Runner
testCount
-
Constructor Details
-
SnapshotRunner
- Throws:
org.junit.runners.model.InitializationError
-
-
Method Details
-
methodInvoker
protected org.junit.runners.model.Statement methodInvoker(org.junit.runners.model.FrameworkMethod method, Object test) - Overrides:
methodInvokerin classorg.junit.runners.BlockJUnit4ClassRunner
-
run
public void run(org.junit.runner.notification.RunNotifier notifier) - Overrides:
runin classorg.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
-
validateTestMethods
- Overrides:
validateTestMethodsin classorg.junit.runners.BlockJUnit4ClassRunner
-