Module de.cuioss.test.generator
Class AbstractCharacteristic<T>
java.lang.Object
de.cuioss.test.generator.internal.net.java.quickcheck.characteristic.AbstractCharacteristic<T>
- Type Parameters:
T- Type of generated random test instances.
- All Implemented Interfaces:
Characteristic<T>
AbstractCharacteristic is an implementation of Characteristic
with Classification handling. The methods
classify(Object) and
classify(boolean, Object) can be used to
classify test data.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdd a classification with the given key if the predicate is true.protected voidAdd a classification with the given key.protected abstract voidImplement this method to specify the characteristic (Characteristic.specify(Object)).Classificationdata about the test cases executed.name()Unique name for this characteristic instance.voidsetUp()Set up operation beforeCharacteristic.specify(Object)is executed.voidChecks the characteristic's specification for a test case instance.voidtearDown()Clean up operation afterCharacteristic.specify(Object)was executed.
-
Constructor Details
-
AbstractCharacteristic
public AbstractCharacteristic() -
AbstractCharacteristic
-
-
Method Details
-
specify
Checks the characteristic's specification for a test case instance. This method will calldoSpecify(Object).- Specified by:
specifyin interfaceCharacteristic<T>- Parameters:
any- for which to check the characteristic- Throws:
Throwable- if the instance does not confirm to the characteristic's specification
-
classify
Add a classification with the given key if the predicate is true.- Parameters:
predicate- Predicate for the classification.classification- classification key.
-
classify
Add a classification with the given key.- Parameters:
classification- classification key.
-
doSpecify
Implement this method to specify the characteristic (Characteristic.specify(Object)).- Throws:
Throwable
-
getClassification
Classificationdata about the test cases executed. -
setUp
Description copied from interface:CharacteristicSet up operation beforeCharacteristic.specify(Object)is executed.- Specified by:
setUpin interfaceCharacteristic<T>- Throws:
Exception
-
tearDown
Description copied from interface:CharacteristicClean up operation afterCharacteristic.specify(Object)was executed.- Specified by:
tearDownin interfaceCharacteristic<T>- Throws:
Exception
-
name
Description copied from interface:CharacteristicUnique name for this characteristic instance.- Specified by:
namein interfaceCharacteristic<T>- Returns:
- name of the characteristic.
-