Package de.rwth.swc.coffee4j.model
Class InputParameterModel
- java.lang.Object
-
- de.rwth.swc.coffee4j.model.InputParameterModel
-
public final class InputParameterModel extends java.lang.ObjectAn representation of a input parameter testModel for combinatorial testing. Consists of a testing strength, readable name for identification, parameter, and forbidden and error constraints. This testModel defines all important aspects of one combinatorial test.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInputParameterModel.BuilderRealization of the builder pattern for constructing aInputParameterModel.
-
Constructor Summary
Constructors Constructor Description InputParameterModel(int strength, java.lang.String name, java.util.List<Parameter> parameters)Creates a new testModel with no constraints.InputParameterModel(int strength, java.lang.String name, java.util.List<Parameter> parameters, java.util.Collection<Constraint> exclusionConstraints, java.util.Collection<Constraint> errorConstraints)Creates a new testModel with all given configuration arguments.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.util.List<Constraint>getErrorConstraints()java.util.List<Constraint>getExclusionConstraints()java.lang.StringgetName()java.util.List<Parameter>getParameters()intgetStrength()inthashCode()static InputParameterModel.BuilderinputParameterModel(java.lang.String name)intsize()java.lang.StringtoString()
-
-
-
Constructor Detail
-
InputParameterModel
public InputParameterModel(int strength, java.lang.String name, java.util.List<Parameter> parameters)Creates a new testModel with no constraints.- Parameters:
strength- the testing strength. Must be equal to or greater than one and at most the number of parametersname- the name of the testModel. Should be human readable. Must not benullparameters- all parameters of the testModel. Must not be, nor containnulland must not be empty. Must not contain parameters with duplicate names
-
InputParameterModel
public InputParameterModel(int strength, java.lang.String name, java.util.List<Parameter> parameters, java.util.Collection<Constraint> exclusionConstraints, java.util.Collection<Constraint> errorConstraints)Creates a new testModel with all given configuration arguments.- Parameters:
strength- the testing strength. Must be equal to or greater than one and at most the number of parametersname- the name of the testModel. Should be human readable. Must not benullparameters- all parameters of the testModel. Must not be, nor containnulland must not be empty.exclusionConstraints- all constraints which may never be violated as test inputs won't work then May not be, nor containnullerrorConstraints- all constraints which may be violated but will cause the system to throw an exception. * All in all describes input which should not be allowed. May not be, nor containnull
-
-
Method Detail
-
getStrength
public int getStrength()
- Returns:
- the testing strength
-
getName
public java.lang.String getName()
- Returns:
- the descriptive name of the testModel
-
getParameters
public java.util.List<Parameter> getParameters()
- Returns:
- a copy of the list of all parameters of this testModel
-
getExclusionConstraints
public java.util.List<Constraint> getExclusionConstraints()
- Returns:
- a copy of the list of all forbidden constraints. Test inputs may never violate those constraints as they define combinations which are not possible testable (like testing safari on windows is not possible)
-
getErrorConstraints
public java.util.List<Constraint> getErrorConstraints()
- Returns:
- a copy of the list of all error constraints. Test inputs may violate these constraints but they define inputs on which the system under test should react in a destructive way like raising exception (like trying to parse "asfd" as a number)
-
size
public int size()
- Returns:
- the number of parameters
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
inputParameterModel
public static InputParameterModel.Builder inputParameterModel(java.lang.String name)
-
-