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:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.junit.runners.model.Statement
    methodInvoker(org.junit.runners.model.FrameworkMethod method, Object test)
     
    void
    run(org.junit.runner.notification.RunNotifier notifier)
     
    protected void
     

    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, withPotentialTimeout

    Methods inherited from class org.junit.runners.ParentRunner

    childrenInvoker, classBlock, classRules, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, runLeaf, 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 Details

    • SnapshotRunner

      public SnapshotRunner(Class<?> klass) throws org.junit.runners.model.InitializationError
      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:
      methodInvoker 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>
    • validateTestMethods

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