|
JET | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.utep.cs.et.gui.tester.EtMethod
class EtMethod
A wrapper for the Method and Constructor
classes to add test-related data such as test cases.
| Field Summary | |
|---|---|
private Class |
cut
The class under test. |
private boolean |
isTested
True if the wrapped method has already been tested. |
private int |
kind
The kind of wrapped method. |
private Member |
meth
The wrapped method or constructor that is being tested. |
private EtTestCase |
selectedTestcase
The currently selected test case. |
private List<EtTestCase> |
testcases
The generated test cases of the wrapped member, meth. |
| Fields inherited from interface edu.utep.cs.et.rat.MethodWrapper |
|---|
BASIC_CONSTRUCTOR, EXTENDED_CONSTRUCTOR, MUTATOR, OBSERVER |
| Constructor Summary | |
|---|---|
EtMethod(Member meth)
Creates a new wrapper for the given method or constructor. |
|
| Method Summary | |
|---|---|
void |
addTestCase(EtTestCase tc)
Adds the given test case to the set of the generated test cases for the wrapped method. |
(package private) boolean |
canBeBasicConstructor()
Returns true if the wrapped method can be user-selected as a basic constrcutor. |
(package private) boolean |
canBeExtendedConstructor()
Returns true if the wrapped method can be user-selected as an extended constructor. |
(package private) boolean |
canBeMutator()
Returns true if the wrapped method can be user-selected as a mutator. |
(package private) boolean |
canBeObserver()
Returns true if the wrapped method can be user-selected as an observer. |
Class |
cut()
Returns the class under test. |
boolean |
equals(Object other)
Returns true if the argument is equal to this object. |
int |
getKind()
Returns the kind of the wrapped method. |
int |
getModifiers()
Returns the modifiers of the wrapped method. |
String |
getName()
Returns the name of the wrapped method. |
Class[] |
getParameterTypes()
Returns the parameter types of the wrapped method. |
Class |
getReturnType()
Returns the return type of the wrapped method. |
Member |
getWrapped()
Returns the wrapped method or constructor. |
int |
hashCode()
Returns the hash code. |
boolean |
hasNegativeTestcase()
Returns true if any negative test cases are generated for the wrapped method. |
boolean |
hasPositiveTestcase()
Returns true if any postive test cases are generated for the wrapped method. |
boolean |
hasTestcases()
Returns true if any test cases are generated for the wrapped method. |
(package private) boolean |
isBasicConstructor()
Returns true if this wraps a basic constructor. |
boolean |
isConstructor()
Returns true if the wrapped method is a constructor. |
(package private) boolean |
isExtendedConstructor()
Returns true if this wraps an extended constructor. |
boolean |
isInstance()
Returns true if wrapped method is an instance method; it is not a static nor a constructor. |
(package private) boolean |
isMutator()
Returns true if this wraps a mutator method. |
boolean |
isStatic()
Returns true if the wrapped method is a static method. |
boolean |
isTested()
Returns true if the wrapped method has been tested. |
Member |
method()
Returns the wrapped method or constructor. |
String |
name()
Returns the name of the wrapped method or constructor. |
void |
prepareForTest()
Prepares for a new test case generation by removing old test cases and resetting internal variables. |
EtTestCase |
selectedTestcase()
Returns the currently selected test case. |
void |
setCut(Class cut)
Set the class under test. |
(package private) void |
setKind()
Sets the kind of the wrapped method based on its signature. |
(package private) void |
setKind(int kind)
Sets the kind of the wrapped method. |
void |
setSelectedTestcase(EtTestCase tc)
Makes the given testcase the currently slected testcase. |
String |
spec()
Returns the specification of the wrapped method. |
Iterable<EtTestCase> |
testcases()
Returns an iterator to iterate over the generated test cases of the wrapped method. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Class cut
meth) are different for
inherited methods.
private Member meth
private EtTestCase selectedTestcase
meth.
private List<EtTestCase> testcases
meth.
private boolean isTested
testcases.size() == 0 doesn't mean that the method
has not been tested because it it is possible to fail generating
any test cases.
private int kind
| Constructor Detail |
|---|
public EtMethod(Member meth)
| Method Detail |
|---|
public Member method()
public Member getWrapped()
getWrapped in interface MethodWrapperpublic void setCut(Class cut)
public Class cut()
public String name()
public void addTestCase(EtTestCase tc)
public Iterable<EtTestCase> testcases()
public boolean isTested()
public void prepareForTest()
public boolean hasTestcases()
public boolean hasPositiveTestcase()
public boolean hasNegativeTestcase()
public void setSelectedTestcase(EtTestCase tc)
public EtTestCase selectedTestcase()
null is returned.
public String spec()
public boolean isStatic()
public boolean isConstructor()
isConstructor in interface MethodWrapperpublic boolean isInstance()
public Class getReturnType()
public Class[] getParameterTypes()
public String getName()
public int getModifiers()
public int getKind()
getKind in interface MethodWrappervoid setKind()
void setKind(int kind)
boolean isBasicConstructor()
boolean isExtendedConstructor()
boolean isMutator()
boolean canBeBasicConstructor()
boolean canBeExtendedConstructor()
boolean canBeMutator()
boolean canBeObserver()
public boolean equals(Object other)
equals in class Objectpublic int hashCode()
equals method; i.e., an overriding method and
its overridden methods are equal to each other.
hashCode in class Object
|
JET | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||