public class ExecutionPlanExpectationHelper extends Object
| Constructor and Description |
|---|
ExecutionPlanExpectationHelper() |
| Modifier and Type | Method and Description |
|---|---|
ExecutionPlanExpectation |
executionPlan()
Constructs an execution plan expectation without any child expectations.
|
ExecutionPlanExpectation |
executionPlan(List<StructuralElementExpectation> children)
Constructs an execution plan expectation with the given child expectations.
|
void |
runTest(Class<?> testClass,
ExecutionPlanExpectation executionPlanExpectation)
Obtains the execution plan for given testClass and asserts it against the
ExecutionPlanExpectation. |
void |
runTest(Class<?> testClass,
Map<String,String> properties,
ExecutionPlanExpectation executionPlanExpectation)
After setting the given properties as JVM System properties the execution plan for given testClass is obtained and
asserted against the
ExecutionPlanExpectation. |
TestClassExpectation |
testClass(Class<?> javaClass,
List<TestParameterExpectation> testParameters,
Iterable<TestStepExpectation> steps)
Constructs a parameterized (multiple parameters) test class expectation for the given parameters.
|
TestClassExpectation |
testClass(Class<?> javaClass,
List<TestStepExpectation> steps)
Constructs a test class expectation for the given parameters.
|
TestClassExpectation |
testClass(Class<?> javaClass,
TestParameterExpectation testParameter,
List<TestStepExpectation> steps)
Constructs a parameterized (single parameter) test class expectation for the given parameters.
|
TestParameterExpectation |
testParameter(String name,
Object value)
Constructs a test parameter expectation for the given parameters.
|
TestStepExpectation |
testStep(String name)
Constructs a test step expectation for the given name.
|
TestStepExpectation |
testStep(String name,
List<TestParameterExpectation> testParameters)
Constructs a parameterized (multiple parameters) test step expectation for the given name.
|
TestStepExpectation |
testStep(String name,
TestParameterExpectation testParameter)
Constructs a parameterized (single parameter) test step expectation for the given name.
|
TestSuiteExpectation |
testSuite(Class<?> javaClass,
List<StructuralElementExpectation> children)
Constructs a test suite expectation for the given parameters.
|
public ExecutionPlanExpectation executionPlan()
public ExecutionPlanExpectation executionPlan(List<StructuralElementExpectation> children)
children - child expectationspublic TestSuiteExpectation testSuite(Class<?> javaClass, List<StructuralElementExpectation> children)
javaClass - the java class which the test suite should base onchildren - the child expectationspublic TestClassExpectation testClass(Class<?> javaClass, List<TestStepExpectation> steps)
javaClass - the java class which the test suite should base onsteps - the step expectationspublic TestClassExpectation testClass(Class<?> javaClass, TestParameterExpectation testParameter, List<TestStepExpectation> steps)
javaClass - the java class which the test suite should base ontestParameter - the expected parametersteps - the step expectationspublic TestClassExpectation testClass(Class<?> javaClass, List<TestParameterExpectation> testParameters, Iterable<TestStepExpectation> steps)
javaClass - the java class which the test suite should base ontestParameters - the expected parameterssteps - the step expectationspublic TestStepExpectation testStep(String name)
name - Name of the test steppublic TestStepExpectation testStep(String name, TestParameterExpectation testParameter)
name - Name of the test steptestParameter - the expected parameterpublic TestStepExpectation testStep(String name, List<TestParameterExpectation> testParameters)
name - Name of the test steptestParameters - the expected parameterspublic TestParameterExpectation testParameter(String name, Object value)
name - expected name of the parametervalue - expected value of the parameterpublic void runTest(Class<?> testClass, Map<String,String> properties, ExecutionPlanExpectation executionPlanExpectation)
ExecutionPlanExpectation.testClass - the test class to be executedproperties - the properties to setexecutionPlanExpectation - the expected execution planpublic void runTest(Class<?> testClass, ExecutionPlanExpectation executionPlanExpectation)
ExecutionPlanExpectation.testClass - the test class to be executedexecutionPlanExpectation - the expected execution planCopyright © 2018–2020 b+m Informatik AG. All rights reserved.