Package io.vertx.ext.unit.junit

## 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
    Constructor | Description
    --- | ---
    `VertxUnitRunner​(Class<?> klass)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | `invokeTestMethod​(org.junit.runners.model.FrameworkMethod fMethod, Object test, TestContext context)` |
    `protected org.junit.runners.model.Statement` | `methodBlock​(org.junit.runners.model.FrameworkMethod method)` |
    `protected org.junit.runners.model.Statement` | `methodInvoker​(org.junit.runners.model.FrameworkMethod method, Object test)` |
    `protected void` | `validatePublicVoidNoArgMethods​(Class<? extends Annotation> annotation, boolean isStatic, List<Throwable> errors)` |
    `protected void` | `validateTestMethod​(org.junit.runners.model.FrameworkMethod fMethod)` |
    `protected org.junit.runners.model.Statement` | `withAfterClasses​(org.junit.runners.model.Statement statement)` |
    `protected org.junit.runners.model.Statement` | `withAfters​(org.junit.runners.model.FrameworkMethod method, Object target, org.junit.runners.model.Statement statement)` |
    `protected org.junit.runners.model.Statement` | `withBeforeClasses​(org.junit.runners.model.Statement statement)` |
    `protected org.junit.runners.model.Statement` | `withBefores​(org.junit.runners.model.FrameworkMethod method, Object target, org.junit.runners.model.Statement statement)` |
    `protected org.junit.runners.model.Statement` | `withPotentialTimeout​(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, validateZeroArgConstructor`

    - ### Methods inherited from class org.junit.runners.ParentRunner

      `childrenInvoker, classBlock, classRules, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, order, run, runLeaf, setScheduler, sort, withInterruptIsolation`

    - ### 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

    - #### VertxUnitRunner

          public VertxUnitRunner​(Class<?> klass)
                          throws org.junit.runners.model.InitializationError

      Throws:
        `org.junit.runners.model.InitializationError`

  - ### Method Detail

    - #### validatePublicVoidNoArgMethods

          protected void validatePublicVoidNoArgMethods​(Class<? extends Annotation> annotation,
                                                        boolean isStatic,
                                                        List<Throwable> errors)

      Overrides:
        `validatePublicVoidNoArgMethods` in class `org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>`

    - #### validateTestMethod

          protected void validateTestMethod​(org.junit.runners.model.FrameworkMethod fMethod)
                                     throws Exception

      Throws:
        `Exception`

    - #### methodInvoker

          protected org.junit.runners.model.Statement methodInvoker​(org.junit.runners.model.FrameworkMethod method,
                                                                    Object test)

      Overrides:
        `methodInvoker` in class `org.junit.runners.BlockJUnit4ClassRunner`

    - #### invokeTestMethod

          protected void invokeTestMethod​(org.junit.runners.model.FrameworkMethod fMethod,
                                          Object test,
                                          TestContext context)
                                   throws InvocationTargetException,
                                          IllegalAccessException

      Throws:
        `InvocationTargetException`
        `IllegalAccessException`

    - #### methodBlock

          protected org.junit.runners.model.Statement methodBlock​(org.junit.runners.model.FrameworkMethod method)

      Overrides:
        `methodBlock` in class `org.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:
        `withBefores` in class `org.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:
        `withAfters` in class `org.junit.runners.BlockJUnit4ClassRunner`

    - #### withBeforeClasses

          protected org.junit.runners.model.Statement withBeforeClasses​(org.junit.runners.model.Statement statement)

      Overrides:
        `withBeforeClasses` in class `org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>`

    - #### withAfterClasses

          protected org.junit.runners.model.Statement withAfterClasses​(org.junit.runners.model.Statement statement)

      Overrides:
        `withAfterClasses` in class `org.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:
        `withPotentialTimeout` in class `org.junit.runners.BlockJUnit4ClassRunner`