Package | org.flexunit.experimental.runners.statements |
Class | public class TheoryAnchor |
Inheritance | TheoryAnchor ![]() ![]() |
Implements | IAsyncStatement |
TheoryAnchor
is responsible for keeping track of the progress of a particular theory method.
It starts the process of running the theory method for each possible combination of provided parameter, and it
also is responsible for handling the overall operation of the theory.
Method | Defined By | ||
---|---|---|---|
Constructor. | TheoryAnchor | ||
evaluate(parentToken:AsyncTestToken):void
Determines all possible parameters that a theory could use and starts the process creating unique combinations
of parameters to run in the theory. | TheoryAnchor |
Method | Defined By | ||
---|---|---|---|
handleMethodExecuteComplete(result:ChildResult):void
Determine if any errors were thrown during execution of the theory or if the theory did not successfully run for
any given data subset. | TheoryAnchor | ||
![]() | sendComplete(error:Error = null):void
If the parentToken has not already been alerted that the statement has completed, alert the parent token that
the current statement has finished. | AsyncStatementBase |
TheoryAnchor | () | Constructor |
public function TheoryAnchor(method:FrameworkMethod, testClass:TestClass)
Constructor.
Parametersmethod:FrameworkMethod — The theory method to run.
| |
testClass:TestClass — The test class that contains the theory to run.
|
evaluate | () | method |
public function evaluate(parentToken:AsyncTestToken):void
Determines all possible parameters that a theory could use and starts the process creating unique combinations of parameters to run in the theory.
Parameters
parentToken:AsyncTestToken — The token to be notified when the test method has finished running.
|
handleAssumptionViolation | () | method |
classInternal function handleAssumptionViolation(e:AssumptionViolatedException):void
Adds a provided AssumptionViolatedException
to an array of AssumptionViolatedException
encountered
during the course of executing the theory.
Parameters
e:AssumptionViolatedException — The AssumptionViolatedException to add.
|
handleDataPointSuccess | () | method |
classInternal function handleDataPointSuccess():void
Updates the number of successes for the given theory. This should be called when the theory successfully runs for a given parameter set.
handleMethodExecuteComplete | () | method |
protected function handleMethodExecuteComplete(result:ChildResult):void
Determine if any errors were thrown during execution of the theory or if the theory did not successfully run for any given data subset.
Parameters
result:ChildResult — The result of the executed theory.
|
nullsOk | () | method |
classInternal function nullsOk():Boolean
Determines whether null paramater values are acceptable for a specific theory.
ReturnsBoolean — a Boolean value indicating whether null parameter values are ok.
|
reportParameterizedError | () | method |
classInternal function reportParameterizedError(e:Error, ... params):Error
Generates a ParameterizedAssertionError
if parameters are provided; otherwise, just returns the error.
Parameters
e:Error — The error that was thrown.
| |
... params — The parameters that were provided to the theory when the error was thrown.
|
Error — the provided error or a ParameterizedAssertionError if parameters are provided.
|