Class CompleteTestModel.Builder
- java.lang.Object
-
- de.rwth.swc.coffee4j.algorithmic.model.CompleteTestModel.Builder
-
- Enclosing class:
- CompleteTestModel
public static final class CompleteTestModel.Builder extends Object
A class for constructing a newCompleteTestModel
instance using the bulider pattern.
-
-
Method Summary
-
-
-
Method Detail
-
positiveTestingStrength
public CompleteTestModel.Builder positiveTestingStrength(int positiveTestingStrength)
- Parameters:
positiveTestingStrength
- the desired default testing strength for positive combinatorial testing- Returns:
- this
-
negativeTestingStrength
public CompleteTestModel.Builder negativeTestingStrength(int negativeTestingStrength)
- Parameters:
negativeTestingStrength
- the desired default testing strength for negative combinatorial testing- Returns:
- this
-
mixedStrengthGroups
public CompleteTestModel.Builder mixedStrengthGroups(Collection<PrimitiveStrengthGroup> mixedStrengthGroups)
- Parameters:
mixedStrengthGroups
- additionalStrengthGroups
for positive combinatorial testing- Returns:
- this
-
mixedStrengthGroups
public CompleteTestModel.Builder mixedStrengthGroups(int errorConstraintId, Collection<PrimitiveStrengthGroup> mixedStrengthGroups)
- Parameters:
errorConstraintId
- the id of the error constraint for which these strength groups are requiredmixedStrengthGroups
- additionalStrengthGroups
for the given error constraint in negative combinatorial testing- Returns:
- this
-
mixedStrengthGroups
public CompleteTestModel.Builder mixedStrengthGroups(it.unimi.dsi.fastutil.ints.Int2ObjectMap<? extends Collection<PrimitiveStrengthGroup>> mixedStrengthGroups)
- Parameters:
mixedStrengthGroups
- a map from error constraint keys to their respective required strength groups. This is a convenience function for directly added strength groups for many error constraints- Returns:
- this
-
parameterSizes
public CompleteTestModel.Builder parameterSizes(int... parameterSizes)
- Parameters:
parameterSizes
- the individual sizes of each parameter. [2, 3, 4] says that the first parameter has two values, the second one three, and the third one four- Returns:
- this
-
exclusionTupleLists
public CompleteTestModel.Builder exclusionTupleLists(Collection<TupleList> exclusionTupleLists)
- Parameters:
exclusionTupleLists
- lists of tuples which must never appear in any generated combinatorial test case (regardless of whether the test is negative or positive)- Returns:
- this
-
errorTupleLists
public CompleteTestModel.Builder errorTupleLists(Collection<TupleList> errorTupleLists)
- Parameters:
errorTupleLists
- lists of tuples which can be individually negated to perform negative combinatorial testing. This means that in a negative combinatorial test one givenTupleList
is always violated while the others are not- Returns:
- this
-
weight
public CompleteTestModel.Builder weight(int parameter, int value, double weight)
Sets the weight for a specific value of a parameter.- Parameters:
parameter
- the index of the parameter starting at zerovalue
- the index of the value starting at zeroweight
- the weight which is assigned to the value. Higher weights mean higher priority- Returns:
- this
-
weights
public CompleteTestModel.Builder weights(it.unimi.dsi.fastutil.ints.Int2ObjectMap<it.unimi.dsi.fastutil.ints.Int2DoubleMap> weights)
Sets multiple weights for specific values.- Parameters:
weights
- a map from parameter indices to maps of value indices to weights. Higher weights mean higher priority. The indices start at zero- Returns:
- this
-
seeds
public CompleteTestModel.Builder seeds(Collection<PrimitiveSeed> seeds)
- Parameters:
seeds
- (partial) seed test cases which must appear in the positive combinatorial test suite- Returns:
- this
-
seeds
public CompleteTestModel.Builder seeds(int errorConstraintId, Collection<PrimitiveSeed> seeds)
- Parameters:
errorConstraintId
- the id of the error constraint for which these (partial) seed test cases are neededseeds
- (partial) seed test cases which must appear in the negative combinatorial test suite for the given error constraint- Returns:
- this
-
seeds
public CompleteTestModel.Builder seeds(it.unimi.dsi.fastutil.ints.Int2ObjectMap<? extends Collection<PrimitiveSeed>> seeds)
- Parameters:
seeds
- a map from error constraint keys to their respective required seeds. This is a convenience function for directly added seeds of many error constraints- Returns:
- this
-
build
public CompleteTestModel build()
- Returns:
- a
CompleteTestModel
constructed using all the information given to the builder
-
-