Package de.gebit.integrity.fixtures
Interface ArbitraryParameterEnumerator
-
public interface ArbitraryParameterEnumerator
Implementations of this class are used to provide an enumeration of all available arbitrary parameters for a fixture class in Eclipse while test scripts are being edited. You must link implementations to their respective fixture classes usingArbitraryParameterFixtureLink
.
Instances of this class must be instantiable using the default no-arg constructor. They will be instantiated inside the Eclipse JVM.- Author:
- Rene Schneider - initial API and implementation
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ArbitraryParameterEnumerator.ArbitraryParameterDefinition
A container for the definition of one arbitrary parameter.static class
ArbitraryParameterEnumerator.ArbitraryParameterSuffix
The suffix types that may follow a parameter name in a suggestion.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<ArbitraryParameterEnumerator.ArbitraryParameterDefinition>
defineArbitraryParameters(java.lang.String aFixtureMethodName, java.util.Map<java.lang.String,java.lang.Object> someFixedParameters, java.util.List<java.lang.String> aNestedObjectPath)
Returns a list of valid parameters that will be added to the fixed parameter to any of the fixture methods in the fixture class that this enumerator is connected to.java.util.List<ArbitraryParameterEnumerator.ArbitraryParameterDefinition>
defineArbitraryResults(java.lang.String aFixtureMethodName, java.util.Map<java.lang.String,java.lang.Object> someFixedParameters, java.util.List<java.lang.String> aNestedObjectPath)
Returns a list of valid result names.
-
-
-
Method Detail
-
defineArbitraryParameters
java.util.List<ArbitraryParameterEnumerator.ArbitraryParameterDefinition> defineArbitraryParameters(java.lang.String aFixtureMethodName, java.util.Map<java.lang.String,java.lang.Object> someFixedParameters, java.util.List<java.lang.String> aNestedObjectPath)
Returns a list of valid parameters that will be added to the fixed parameter to any of the fixture methods in the fixture class that this enumerator is connected to.
This method will be called by the editor inside Eclipse; it is the counterpart ofArbitraryParameterFixture#defineArbitraryParameters(String, Map)
, thus it is expected to return the same parameters. The name of the fixture method in question is provided, as well as all fixed parameters that have been defined yet.
The idea behind the arbitrary parameter mechanism is for this method to compute all available arbitrary params with respect to the fixed parameters and the method being called. Note that this information is not used to actually limit the parameters that may be entered by the user, but only for providing autocompletion and content assist as well as automatic conversion of values. The user may still enter a parameter of any name, which will then be passed to the fixture method without any value conversion.- Parameters:
aFixtureMethodName
- The name of the fixture method being called or enteredsomeFixedParameters
- A map of fixed parameters and valuesaNestedObjectPath
- A path to the current position in a nested object (null if not in a nested object; this can be used to optimize the amount of information to return)- Returns:
- A list with definitions of arbitrary parameters.
-
defineArbitraryResults
java.util.List<ArbitraryParameterEnumerator.ArbitraryParameterDefinition> defineArbitraryResults(java.lang.String aFixtureMethodName, java.util.Map<java.lang.String,java.lang.Object> someFixedParameters, java.util.List<java.lang.String> aNestedObjectPath)
Returns a list of valid result names. This basically works like#defineArbitraryParameters(String, Map, boolean)
, but is used to determine named result identifiers.- Parameters:
aFixtureMethodName
-someFixedParameters
-aNestedObjectPath
-- Returns:
-
-