| Package | org.flexunit.experimental.theories.internals |
| Class | public class Assignments |
| Inheritance | Assignments Object |
Assignments is responsible for keeping track of assigned and unassigned parameters for a given
configuration of a theory method.
| Property | Defined By | ||
|---|---|---|---|
| assigned : Array
An array of IPotentialAssignments that have been assigned values. | Assignments | ||
| complete : Boolean [read-only]
Returns a Boolean value indicating whether all unassigned values have been assigned. | Assignments | ||
| testClass : TestClass
The test class that contains the theory. | Assignments | ||
| unassigned : Array
An array of ParameterSignatures that not been assigned values. | Assignments | ||
| Method | Defined By | ||
|---|---|---|---|
Assignments(assigned:Array, unassigned:Array, testClass:TestClass)
Constructor. | Assignments | ||
[static] This is perhaps a tad bit more complicated than really needed for AS. | Assignments | ||
Creates a new Assignments consiting of the assigned array containing the new source and
the the array of still unassigned ParameterSignatures minus the first element which was
just assigned. | Assignments | ||
getActualValues(start:int, stop:int, nullsOk:Boolean):Array
Returns an array of values from IPotentialAssignments ranging from the start poisition to the stop position
in the assigned array. | Assignments | ||
getAllArguments(nullsOk:Boolean):Array
Retrieves an array of all arguments from the assigned array. | Assignments | ||
Retrieves an object that implements IParameterSupplier that can be used to obtain potential values
for the provided ParameterSignature. | Assignments | ||
getArgumentStrings(nullsOk:Boolean):Array
Returns an array of descriptions for all currently assigned IPotentialAssignments. | Assignments | ||
getConstructorArguments(nullsOk:Boolean):Array
Retrieves an array of constructor arguments from the assigned array. | Assignments | ||
getMethodArguments(nullsOk:Boolean):Array
Retrieves an array of method arguments from the assigned array. | Assignments | ||
Retrieves an object that implements IParameterSupplier that can be used to obtain potential values
for the provided ParameterSignature. | Assignments | ||
Returns the next unassigned ParameterSignature. | Assignments | ||
potentialsForNextUnassigned():Array
Retrieves the potential values that the next unassigned ParameterSignature can use. | Assignments | ||
toString():String
Returns a string containing the name of the test class, the assigned parameters, and the
unassigned parameters. | Assignments | ||
| assigned | property |
public var assigned:Array
An array of IPotentialAssignments that have been assigned values.
| complete | property |
complete:Boolean [read-only] Returns a Boolean value indicating whether all unassigned values have been assigned.
public function get complete():Boolean| testClass | property |
public var testClass:TestClassThe test class that contains the theory.
| unassigned | property |
public var unassigned:Array
An array of ParameterSignatures that not been assigned values.
| Assignments | () | Constructor |
public function Assignments(assigned:Array, unassigned:Array, testClass:TestClass)Constructor.
Parametersassigned:Array — An array of IPotentialAssignments that have been assigned values.
| |
unassigned:Array — An array of ParameterSignatures that not been assigned values.
| |
testClass:TestClass — The test class that contains the theory.
|
| allUnassigned | () | method |
public static function allUnassigned(method:Method, testClass:TestClass):AssignmentsThis is perhaps a tad bit more complicated than really needed for AS. The java version really needs to worry about multiple method signatures including multiple constructor signatures. No such worries here, but the basic flow was kept the same to be relatable and cause... who knows what the future could bring.
Parameters
method:Method — The current theory method.
| |
testClass:TestClass — The test class that contains the method.
|
Assignments — an Assignments that contains all unassigned ParameterSignature that need to be assigned
before a theory method test can be run.
|
| assignNext | () | method |
public function assignNext(source:IPotentialAssignment):Assignments
Creates a new Assignments consiting of the assigned array containing the new source and
the the array of still unassigned ParameterSignatures minus the first element which was
just assigned.
Parameters
source:IPotentialAssignment — The new IPotentialAssignment to add.
|
Assignments — an new Assignments with one more assigned parameter and one fewer unassigned parameters.
|
| getActualValues | () | method |
public function getActualValues(start:int, stop:int, nullsOk:Boolean):Array
Returns an array of values from IPotentialAssignments ranging from the start poisition to the stop position
in the assigned array.
Parameters
start:int — The starting position in the assigned array.
| |
stop:int — The ending position in the assigned array.
| |
nullsOk:Boolean — A Boolean value indicating whether a null value is acceptable. If a null values are not ok,
a CouldNotGenerateValueException will be thrown.
|
Array — An array of values from IPotentialAssignments ranging from the start poisition to the stop position
in the assigned array.
|
CouldNotGenerateValueException — if a value of null is encountered a nulls are not allowed.
|
| getAllArguments | () | method |
public function getAllArguments(nullsOk:Boolean):ArrayRetrieves an array of all arguments from the assigned array.
Parameters
nullsOk:Boolean — A Boolean value indicating whether null values are acceptable as an argument.
|
Array — an array of all arguments from the assigned array.
|
| getAnnotatedSupplier | () | method |
public function getAnnotatedSupplier(unassigned:ParameterSignature):IParameterSupplier
Retrieves an object that implements IParameterSupplier that can be used to obtain potential values
for the provided ParameterSignature.
Parameters
unassigned:ParameterSignature — The parameter signature used to determine the IParameterSupplier.
|
IParameterSupplier — an object that implements IParameterSupplier that can be used to get potential values
for the ParameterSignature. If no annotated suppliet can be found for the ParameterSignature,
a value of null is returned.
|
| getArgumentStrings | () | method |
public function getArgumentStrings(nullsOk:Boolean):Array
Returns an array of descriptions for all currently assigned IPotentialAssignments.
Parameters
nullsOk:Boolean — A Boolean that indicates whether null values will be accepted.
|
Array — an array of descriptions for all currently assigned IPotentialAssignments.
|
| getConstructorArguments | () | method |
public function getConstructorArguments(nullsOk:Boolean):ArrayRetrieves an array of constructor arguments from the assigned array.
Parameters
nullsOk:Boolean — A Boolean value indicating whether null values are acceptable as an argument.
|
Array — an array of constructor arguments from the assigned array.
|
| getMethodArguments | () | method |
public function getMethodArguments(nullsOk:Boolean):ArrayRetrieves an array of method arguments from the assigned array.
Parameters
nullsOk:Boolean — A Boolean value indicating whether null values are acceptable as an argument.
|
Array — an array of method arguments from the assigned array.
|
| getSupplier | () | method |
public function getSupplier(unassigned:ParameterSignature):IParameterSupplier
Retrieves an object that implements IParameterSupplier that can be used to obtain potential values
for the provided ParameterSignature.
Parameters
unassigned:ParameterSignature — The parameter signature used to determine the IParameterSupplier.
|
IParameterSupplier — an object that implements IParameterSupplier that can be used to get potential values
for the ParameterSignature.
|
| nextUnassigned | () | method |
public function nextUnassigned():ParameterSignature
Returns the next unassigned ParameterSignature.
ParameterSignature |
| potentialsForNextUnassigned | () | method |
public function potentialsForNextUnassigned():Array
Retrieves the potential values that the next unassigned ParameterSignature can use.
Array — an Array consisting of values that can be potentially used by the next
unassigned ParameterSignature.
|
| toString | () | method |
public function toString():StringReturns a string containing the name of the test class, the assigned parameters, and the unassigned parameters.
ReturnsString |