Class VertxUnitRunner
java.lang.Object
org.junit.runner.Runner
org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
org.junit.runners.BlockJUnit4ClassRunner
io.vertx.ext.unit.junit.VertxUnitRunner
- All Implemented Interfaces:
org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Orderable, org.junit.runner.manipulation.Sortable
- Direct Known Subclasses:
VertxUnitRunnerWithParameters
public class VertxUnitRunner
extends org.junit.runners.BlockJUnit4ClassRunner
A JUnit runner for writing asynchronous tests.
Note : a runner is needed because when a rule statement is evaluated, it will run the before/test/after
method and then test method is executed even if there are pending Async objects in the before
method. The runner gives this necessary fine grained control.
- Author:
- Julien Viet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidinvokeTestMethod(org.junit.runners.model.FrameworkMethod fMethod, Object test, TestContext context) protected org.junit.runners.model.StatementmethodBlock(org.junit.runners.model.FrameworkMethod method) protected org.junit.runners.model.StatementmethodInvoker(org.junit.runners.model.FrameworkMethod method, Object test) protected voidvalidatePublicVoidNoArgMethods(Class<? extends Annotation> annotation, boolean isStatic, List<Throwable> errors) protected voidvalidateTestMethod(org.junit.runners.model.FrameworkMethod fMethod) protected org.junit.runners.model.StatementwithAfterClasses(org.junit.runners.model.Statement statement) protected org.junit.runners.model.StatementwithAfters(org.junit.runners.model.FrameworkMethod method, Object target, org.junit.runners.model.Statement statement) protected org.junit.runners.model.StatementwithBeforeClasses(org.junit.runners.model.Statement statement) protected org.junit.runners.model.StatementwithBefores(org.junit.runners.model.FrameworkMethod method, Object target, org.junit.runners.model.Statement statement) protected org.junit.runners.model.StatementwithPotentialTimeout(org.junit.runners.model.FrameworkMethod method, Object test, org.junit.runners.model.Statement next) Methods inherited from class org.junit.runners.BlockJUnit4ClassRunner
collectInitializationErrors, computeTestMethods, createTest, createTest, describeChild, getChildren, getTestRules, isIgnored, possiblyExpectingExceptions, rules, runChild, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructorMethods inherited from class org.junit.runners.ParentRunner
childrenInvoker, classBlock, classRules, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, order, run, runLeaf, setScheduler, sort, withInterruptIsolationMethods inherited from class org.junit.runner.Runner
testCount
-
Constructor Details
-
VertxUnitRunner
- Throws:
org.junit.runners.model.InitializationError
-
-
Method Details
-
validatePublicVoidNoArgMethods
protected void validatePublicVoidNoArgMethods(Class<? extends Annotation> annotation, boolean isStatic, List<Throwable> errors) - Overrides:
validatePublicVoidNoArgMethodsin classorg.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
-
validateTestMethod
-
methodInvoker
protected org.junit.runners.model.Statement methodInvoker(org.junit.runners.model.FrameworkMethod method, Object test) - Overrides:
methodInvokerin classorg.junit.runners.BlockJUnit4ClassRunner
-
invokeTestMethod
protected void invokeTestMethod(org.junit.runners.model.FrameworkMethod fMethod, Object test, TestContext context) throws InvocationTargetException, IllegalAccessException -
methodBlock
protected org.junit.runners.model.Statement methodBlock(org.junit.runners.model.FrameworkMethod method) - Overrides:
methodBlockin classorg.junit.runners.BlockJUnit4ClassRunner
-
withBefores
protected org.junit.runners.model.Statement withBefores(org.junit.runners.model.FrameworkMethod method, Object target, org.junit.runners.model.Statement statement) - Overrides:
withBeforesin classorg.junit.runners.BlockJUnit4ClassRunner
-
withAfters
protected org.junit.runners.model.Statement withAfters(org.junit.runners.model.FrameworkMethod method, Object target, org.junit.runners.model.Statement statement) - Overrides:
withAftersin classorg.junit.runners.BlockJUnit4ClassRunner
-
withBeforeClasses
protected org.junit.runners.model.Statement withBeforeClasses(org.junit.runners.model.Statement statement) - Overrides:
withBeforeClassesin classorg.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
-
withAfterClasses
protected org.junit.runners.model.Statement withAfterClasses(org.junit.runners.model.Statement statement) - Overrides:
withAfterClassesin classorg.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
-
withPotentialTimeout
protected org.junit.runners.model.Statement withPotentialTimeout(org.junit.runners.model.FrameworkMethod method, Object test, org.junit.runners.model.Statement next) - Overrides:
withPotentialTimeoutin classorg.junit.runners.BlockJUnit4ClassRunner
-