public class SnapshotRunner
extends org.junit.runners.BlockJUnit4ClassRunner
If you are already using @RunWith for something else such as @RunWith(Parameterized.class) use these Rules instead.
SnapshotClassRule,
{@code
{@literal @}ClassRule
public static SnapshotClassRule snapshotClassRule = new SnapshotClassRule();
{@literal @}Rule
public SnapshotRule snapshotRule = new SnapshotRule(snapshotClassRule);
private Expect expect;
}
Loosely based on:
https://stackoverflow.com/questions/27745691/how-to-combine-runwith-with-runwithparameterized-class| Constructor and Description |
|---|
SnapshotRunner(java.lang.Class<?> klass) |
| Modifier and Type | Method and Description |
|---|---|
protected org.junit.runners.model.Statement |
methodInvoker(org.junit.runners.model.FrameworkMethod method,
java.lang.Object test) |
void |
run(org.junit.runner.notification.RunNotifier notifier) |
protected void |
validateTestMethods(java.util.List<java.lang.Throwable> errors) |
collectInitializationErrors, computeTestMethods, createTest, describeChild, getChildren, getTestRules, isIgnored, methodBlock, possiblyExpectingExceptions, rules, runChild, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeoutpublic SnapshotRunner(java.lang.Class<?> klass)
throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationErrorprotected org.junit.runners.model.Statement methodInvoker(org.junit.runners.model.FrameworkMethod method,
java.lang.Object test)
methodInvoker in class org.junit.runners.BlockJUnit4ClassRunnerpublic void run(org.junit.runner.notification.RunNotifier notifier)
run in class org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>protected void validateTestMethods(java.util.List<java.lang.Throwable> errors)
validateTestMethods in class org.junit.runners.BlockJUnit4ClassRunner