public class TestValidator
extends java.lang.Object
| Constructor and Description |
|---|
TestValidator(DataConverter dataConverter) |
| Modifier and Type | Method and Description |
|---|---|
void |
validateDataProviderMethod(org.junit.runners.model.FrameworkMethod dataProviderMethod,
DataProvider dataProvider,
java.util.List<java.lang.Throwable> errors)
Checks if the given
dataProviderMethod is a valid dataprovider and adds a Exception to
errors if it
is not public,
is not static,
takes parameters, or
does return a convertible type, see DataConverter.canConvert(java.lang.reflect.Type)
|
void |
validateTestMethod(org.junit.runners.model.FrameworkMethod testMethod,
java.util.List<java.lang.Throwable> errors)
Checks if the given
testMethod is a valid test method depending on the dataprovider relevant annotation
@DataProvider and @UseDataProvider. |
public TestValidator(DataConverter dataConverter)
public void validateTestMethod(org.junit.runners.model.FrameworkMethod testMethod,
java.util.List<java.lang.Throwable> errors)
testMethod is a valid test method depending on the dataprovider relevant annotation
@DataProvider and @UseDataProvider. Adds Exceptions to errors for
each invalid property. A normal test method must be is public, void instance method with no arguments. A data
provider test method must be is public and void instance method but have a least one argument.testMethod - the test method to be validatederrors - to be "returned" and thrown as InitializationErrorjava.lang.IllegalArgumentException - if given errors is nullpublic void validateDataProviderMethod(org.junit.runners.model.FrameworkMethod dataProviderMethod,
DataProvider dataProvider,
java.util.List<java.lang.Throwable> errors)
dataProviderMethod is a valid dataprovider and adds a Exception to
errors if it
DataConverter.canConvert(java.lang.reflect.Type)
This method is package private (= visible) for testing.
dataProviderMethod - the method to checkdataProvider - the @DataProvider annotation used on dataProviderMethoderrors - to be "returned" and thrown as InitializationErrorjava.lang.NullPointerException - iif any argument is null