org.easetech.easytest.runner
Class InternalParameterizedStatement
java.lang.Object
org.junit.runners.model.Statement
org.easetech.easytest.runner.InternalParameterizedStatement
public class InternalParameterizedStatement
- extends org.junit.runners.model.Statement
An internal class that holds the logic of running a given Test method. This class contains the common code for both
DataDrivenTestRunner.EasyTestRunner and SpringTestRunner that is present in the easytest-spring module.
- Author:
- Anuj Kumar
|
Field Summary |
protected org.slf4j.Logger |
LOG
An instance of logger associated with the test framework. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
protected final org.slf4j.Logger LOG
- An instance of logger associated with the test framework.
InternalParameterizedStatement
public InternalParameterizedStatement(org.junit.runners.model.FrameworkMethod fTestMethod,
TestResultBean testResult,
ReportDataContainer testReportContainer,
Map<String,List<Map<String,Object>>> writableData,
org.junit.runners.model.TestClass testClass,
Object testInstance)
evaluate
public void evaluate()
throws Throwable
- Specified by:
evaluate in class org.junit.runners.model.Statement
- Throws:
Throwable
runWithAssignment
protected void runWithAssignment(EasyAssignments parameterAssignment)
throws Throwable
- This method encapsulates the actual change in behavior from the traditional JUnit Theories way of populating and
supplying the test data to the test method. This method creates a list of
Assignments identified by
listOfAssignments and then calls runWithCompleteAssignment(EasyAssignments) for each
Assignments element in the listOfAssignments
- Parameters:
parameterAssignment - an instance of Assignments identifying the parameters that needs to be
supplied test data
- Throws:
Throwable - if any exception occurs.
runWithCompleteAssignment
protected void runWithCompleteAssignment(EasyAssignments complete)
throws InstantiationException,
IllegalAccessException,
InvocationTargetException,
NoSuchMethodException,
Throwable
- Run the test data with complete Assignments
- Parameters:
complete - the Assignments
- Throws:
InstantiationException - if an error occurs while instantiating the method
IllegalAccessException - if an error occurs due to illegal access to the test method
InvocationTargetException - if an error occurs because the method is not invokable
NoSuchMethodException - if an error occurs because no such method with the given name exists.
Throwable - any other error
handleAssumptionViolation
protected void handleAssumptionViolation(org.junit.internal.AssumptionViolatedException e)
reportParameterizedError
protected void reportParameterizedError(Throwable e,
Object... params)
throws Throwable
- Throws:
Throwable
handleDataPointSuccess
protected void handleDataPointSuccess()
Copyright © 2013. All Rights Reserved.