Package de.rwth.swc.coffee4j.engine
Class TestModel
- java.lang.Object
-
- de.rwth.swc.coffee4j.engine.TestModel
-
public class TestModel extends java.lang.ObjectA class containing all important information needed for one combinatorial test. This includes the desired testing strength, the parameters and forbidden/error constraints. Forbidden constraints should never appear in any test input as they just cannot be executed, while error constraints should lead to validation or other kinds of errors in an application and should therefore be tested
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.util.List<Constraint>getErrorConstraints()java.util.List<TupleList>getErrorTupleLists()java.util.List<Constraint>getExclusionConstraints()java.util.List<TupleList>getForbiddenTupleLists()intgetNumberOfParameters()int[]getParameterSizes()intgetSizeOfParameter(int parameterId)intgetStrength()inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
TestModel
public TestModel(int strength, int[] parameterSizes, java.util.Collection<TupleList> forbiddenTupleLists, java.util.Collection<TupleList> errorTupleLists)- Parameters:
strength- the desired testing strength. Must be equal to or greater than one and at most the number of parametersparameterSizes- the sizes of all parameters. [2, 3, 5] means the first parameter has 2 values, the second one 3 and the last one 5. All parameters need to have at least two values. Must not benullforbiddenTupleLists- all forbidden combinations. Must not benull. The sizes of the corresponding parameters must be respected. Must not contain duplicate idserrorTupleLists- all error combinations. Must not benull. The sizes of the corresponding parameters must be respected. Must not contain duplicate ids or ids contained in the forbiddenTupleLists
-
-
Method Detail
-
getStrength
public int getStrength()
- Returns:
- the testing strength
-
getParameterSizes
public int[] getParameterSizes()
- Returns:
- the number of values for each parameter
-
getForbiddenTupleLists
public java.util.List<TupleList> getForbiddenTupleLists()
- Returns:
- all forbidden combinations. Tests containing these combinations cannot be executed
-
getErrorTupleLists
public java.util.List<TupleList> getErrorTupleLists()
- Returns:
- all error combinations. Tests containing these combinations can be executed but should cause an error
-
getExclusionConstraints
public java.util.List<Constraint> getExclusionConstraints()
-
getErrorConstraints
public java.util.List<Constraint> getErrorConstraints()
-
getNumberOfParameters
public int getNumberOfParameters()
- Returns:
- the number of parameters
-
getSizeOfParameter
public int getSizeOfParameter(int parameterId)
- Parameters:
parameterId- the id of a parameter in the model- Returns:
- the number of values this parameter has
-
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
-
-