Module de.cuioss.test.generator
Class Classification
java.lang.Object
de.cuioss.test.generator.internal.net.java.quickcheck.characteristic.Classification
Gather frequency information about test values.
Classifications are used to categories test cases. While
Characteristic.specify(Object) is executed characteristic instances
can add classifications with
doClassify(boolean, Object). For each execution of
Characteristic.specify(Object) call() has to
be executed once.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcall()Count the number of calls.voidclassifyCall(boolean predicate, Object classification) voidclassifyCall(Object classification) voiddoClassify(boolean predicate, Object classification) Increment the classification counter for the given classification.voiddoClassify(Object classification) Get a list of known categories.doublegetFrequency(Object classification) Get the frequency of the given category.toString()
-
Constructor Details
-
Classification
public Classification()
-
-
Method Details
-
getFrequency
Get the frequency of the given category.- Returns:
- per cent of test cases with this classification.
-
getCategories
Get a list of known categories. Categories are sorted in descending frequency. -
toString
-
doClassify
-
doClassify
Increment the classification counter for the given classification.- Parameters:
predicate- increment only if the predicate is true.classification- classification key
-
call
Count the number of calls. -
classifyCall
-
classifyCall
-