public class BaseSuite
extends org.junit.runners.Suite
Suite class for EasyTest based Runners. This class abstracts a lot of boiler plate logic so as to give
EasyTest based Runners convenient and single place for reference.| Modifier and Type | Field and Description |
|---|---|
protected List<org.junit.runners.model.FrameworkMethod> |
methodsWithData
List of
FrameworkMethod that does have any external test data associated with them. |
protected List<org.junit.runners.model.FrameworkMethod> |
methodsWithNoData
List of
FrameworkMethod that does not have any external test data associated with them. |
protected List<org.junit.runner.Runner> |
runners
A List of
DataDrivenTestRunners. |
protected Map<String,List<Map<String,Object>>> |
writableData
An instance of
Map that contains the data to be written to the File |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseSuite(Class<?> klass)
Construct a new BaseSuite.
|
| Modifier and Type | Method and Description |
|---|---|
protected List<org.junit.runner.Runner> |
getChildren()
Get the children Runners
|
boolean |
isSupportsTransaction()
Set whether the Runner supports enabling Transactions for each test method
|
void |
registerConverter(Converters converter)
Method responsible for registering the converters with the EasyTest framework
|
void |
setSupportsTransaction(boolean supportsTransaction) |
protected org.junit.runners.model.Statement |
withAfterClasses(org.junit.runners.model.Statement statement)
Returns a
Statement: We override this method as it was being called twice for the same class. |
protected org.junit.runners.model.Statement |
withBeforeClasses(org.junit.runners.model.Statement statement)
Returns a
Statement: We override this method as it was being called twice for the same class. |
protected Map<String,List<Map<String,Object>>> writableData
Map that contains the data to be written to the Fileprotected final List<org.junit.runner.Runner> runners
DataDrivenTestRunners.protected List<org.junit.runners.model.FrameworkMethod> methodsWithNoData
FrameworkMethod that does not have any external test data associated with them.protected List<org.junit.runners.model.FrameworkMethod> methodsWithData
FrameworkMethod that does have any external test data associated with them.protected BaseSuite(Class<?> klass) throws org.junit.runners.model.InitializationError
TestConfigProvider,
load any input test data provided using the DataLoader annotation, both at the class level as well as method level
register any converters provide using Converters, both at the class level as well as method level.klass - the class under testorg.junit.runners.model.InitializationError - if any error occursprotected List<org.junit.runner.Runner> getChildren()
getChildren in class org.junit.runners.SuiteDataDrivenTestRunnerpublic void registerConverter(Converters converter)
converter - the annotation Convertersprotected org.junit.runners.model.Statement withBeforeClasses(org.junit.runners.model.Statement statement)
Statement: We override this method as it was being called twice for the same class. Looks like
a bug in JUnit.withBeforeClasses in class org.junit.runners.ParentRunner<org.junit.runner.Runner>protected org.junit.runners.model.Statement withAfterClasses(org.junit.runners.model.Statement statement)
Statement: We override this method as it was being called twice for the same class. Looks like
a bug in JUnit.withAfterClasses in class org.junit.runners.ParentRunner<org.junit.runner.Runner>public boolean isSupportsTransaction()
public void setSupportsTransaction(boolean supportsTransaction)
supportsTransaction - the supportsTransaction to setCopyright © 2014. All rights reserved.