|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.java.quickcheck.characteristic.AbstractCharacteristic<T>
T
- Type of generated random test instances.public abstract class AbstractCharacteristic<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 | |
---|---|
AbstractCharacteristic()
|
|
AbstractCharacteristic(String name)
|
Method Summary | |
---|---|
protected void |
classify(boolean predicate,
Object classification)
Add a classification with the given key if the predicate is true. |
protected void |
classify(Object classification)
Add a classification with the given key. |
protected abstract void |
doSpecify(T any)
Implement this method to specify the characteristic ( Characteristic.specify(Object) ). |
Classification |
getClassification()
Classification data about the test cases executed. |
String |
name()
Unique name for this characteristic instance. |
void |
setUp()
Set up operation before Characteristic.specify(Object) is
executed. |
void |
specify(T any)
Checks the characteristic's specification for a test case instance. |
void |
tearDown()
Clean up operation after Characteristic.specify(Object) was
executed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractCharacteristic()
public AbstractCharacteristic(String name)
Method Detail |
---|
public void specify(T any) throws Throwable
specify(Object)
will call
doSpecify(Object)
.
specify
in interface Characteristic<T>
any
- for which to check the characteristic
Throwable
- if the instance does not confirm to the characteristic's
specificationprotected void classify(boolean predicate, Object classification)
classification
- classification key.protected void classify(Object classification)
classification
- classification key.protected abstract void doSpecify(T any) throws Throwable
Characteristic.specify(Object)
).
Throwable
public Classification getClassification()
Classification
data about the test cases executed.
public void setUp() throws Exception
Characteristic.specify(Object)
is
executed.
setUp
in interface Characteristic<T>
Exception
public void tearDown() throws Exception
Characteristic.specify(Object)
was
executed.
tearDown
in interface Characteristic<T>
Exception
public String name()
Characteristic
name
in interface Characteristic<T>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |