public class ContractTestRunner
extends org.junit.runners.BlockJUnit4ClassRunner
| Constructor and Description |
|---|
ContractTestRunner(java.lang.Class<?> testClass)
Create a test runner for stand alone test
|
ContractTestRunner(java.lang.Object getterObj,
TestInfo parentTestInfo,
TestInfo testInfo,
java.util.List<java.lang.reflect.Method> excludedMethods)
Create a test runner within the ContractTestSuite.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.util.List<org.junit.runners.model.FrameworkMethod> |
computeTestMethods()
Returns the methods that run tests.
|
protected java.lang.Object |
createTest()
Create the concrete class passing it the producer instance from the
getter class.
|
protected org.junit.runner.Description |
describeChild(org.junit.runners.model.FrameworkMethod method) |
protected java.lang.String |
getName()
Returns a name used to describe this Runner
|
protected void |
runChild(org.junit.runners.model.FrameworkMethod method,
org.junit.runner.notification.RunNotifier notifier) |
java.lang.String |
toString() |
protected void |
validateConstructor(java.util.List<java.lang.Throwable> errors)
Adds to
errors if the test class has more than one constructor,
or if the constructor takes parameters. |
collectInitializationErrors, getChildren, getTestRules, methodBlock, methodInvoker, possiblyExpectingExceptions, rules, testName, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeoutpublic ContractTestRunner(java.lang.Object getterObj,
TestInfo parentTestInfo,
TestInfo testInfo,
java.util.List<java.lang.reflect.Method> excludedMethods)
throws org.junit.runners.model.InitializationError
getterObj - The object on which we will execute the method that gets the
producer.parentTestInfo - The test info for the parent.testInfo - The test info for this test.excludedMethods - A list of test methods that should not be executed.org.junit.runners.model.InitializationError - on error.public ContractTestRunner(java.lang.Class<?> testClass)
throws org.junit.runners.model.InitializationError
testClass - The ContractTest annotated class.org.junit.runners.model.InitializationError - on error.protected java.lang.Object createTest()
throws java.lang.InstantiationException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException
createTest in class org.junit.runners.BlockJUnit4ClassRunnerjava.lang.reflect.InvocationTargetException - if the testClass can not be initialized with
newInstance()java.lang.IllegalArgumentException - if any of the classes can not be initialized or the dynamic
method can not be called.java.lang.reflect.InvocationTargetException - if any of the classes can not be initialized or the dynamic
method can not be called.java.lang.InstantiationExceptionjava.lang.IllegalAccessExceptionprotected void runChild(org.junit.runners.model.FrameworkMethod method,
org.junit.runner.notification.RunNotifier notifier)
runChild in class org.junit.runners.BlockJUnit4ClassRunnerprotected void validateConstructor(java.util.List<java.lang.Throwable> errors)
errors if the test class has more than one constructor,
or if the constructor takes parameters. Override if a subclass requires
different validation rules.validateConstructor in class org.junit.runners.BlockJUnit4ClassRunnerprotected java.lang.String getName()
getName in class org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>protected org.junit.runner.Description describeChild(org.junit.runners.model.FrameworkMethod method)
describeChild in class org.junit.runners.BlockJUnit4ClassRunnerprotected java.util.List<org.junit.runners.model.FrameworkMethod> computeTestMethods()
@Test on this class and superclasses that
are not overridden.computeTestMethods in class org.junit.runners.BlockJUnit4ClassRunnerpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2013-2018 XENEI.com. All Rights Reserved.