|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jwalk.core.TestCase org.jwalk.core.EnumTestCase
public class EnumTestCase
EnumTestCase is a kind of test case that selects an enumerated constant. Rather than having to construct an object, or invoke a method, this kind of TestCase has to select one of the unique constants listed for its enumerated type. A unique constant is selected when this EnumTestCase is constructed. Executing this test case has no further effect, other than to encode the state represented by the value.
Field Summary |
---|
Fields inherited from class org.jwalk.core.TestCase |
---|
inspector, state |
Constructor Summary | |
---|---|
EnumTestCase(java.lang.Enum<?> value)
Creates an EnumTestCase for an enumerated value. |
Method Summary | |
---|---|
java.lang.Object |
execute(ObjectGenerator generator,
java.lang.Object target)
Executes this EnumTestCase, returning the result. |
java.lang.String |
getKey(ObjectGenerator generator)
Returns a unique indexing key for this EnumTestCase. |
java.lang.reflect.Member |
getOperation()
Returns the tested operation for this EnumTestCase. |
java.lang.Class<?> |
getReturnType()
Returns the result type of the tested operation. |
java.lang.String |
toString(ObjectGenerator generator)
Returns a pretty-printed representation of this EnumTestCase. |
Methods inherited from class org.jwalk.core.TestCase |
---|
clone, getState, setInspector |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EnumTestCase(java.lang.Enum<?> value)
value
- the enumerated value.Method Detail |
---|
public java.lang.Object execute(ObjectGenerator generator, java.lang.Object target)
execute
in class TestCase
generator
- the ObjectGenerator for synthesising test inputs.target
- the target object, initially null.
public java.lang.String getKey(ObjectGenerator generator)
getKey()
.
getKey
in class TestCase
generator
- the ObjectGenerator which synthesised the constant.
public java.lang.reflect.Member getOperation()
getOperation
in class TestCase
public java.lang.Class<?> getReturnType()
getReturnType
in class TestCase
public java.lang.String toString(ObjectGenerator generator)
TestEnum target = TestEnum.value_i;
toString
in class TestCase
generator
- the ObjectGenerator which synthesised the parameters.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |