class JUnitUtil extends java.lang.Object
Utility methods for JUnit rule classes. This class is not intended for general use.
Type Params | Return Type | Name and description |
---|---|---|
|
protected static boolean |
isAssertCallWithConstantValue(MethodCallExpression methodCall, java.lang.String methodName, java.lang.Object value) Return true if the MethodCallExpression represents a JUnit assert method call with the specified method name and constant argument value. |
|
protected static boolean |
isAssertCallWithLiteralValue(MethodCallExpression methodCall, java.lang.String methodName, boolean literalEvaluatesToTrue) Return true if the MethodCallExpression represents a JUnit assert method call with the specified method name and constant argument value. |
|
protected static boolean |
isAssertCallWithNonNullConstantValue(MethodCallExpression methodCall, java.lang.String methodName) |
|
protected static boolean |
isSetUpMethod(MethodNode methodNode) |
|
protected static boolean |
isTearDownMethod(MethodNode methodNode) |
|
static boolean |
isTestMethod(ASTNode node) Tells you if an ASTNode is a test MethodNode. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Return true if the MethodCallExpression represents a JUnit assert method call with the specified method name and constant argument value. This handles either single-argument assert calls or 2-argument assert methods where the first parameter is the assertion message.
methodCall
- - the MethodCallExpression of the method callmethodName
- - the name of the methodvalue
- - the argument valueReturn true if the MethodCallExpression represents a JUnit assert method call with the specified method name and constant argument value. This handles either single-argument assert calls or 2-argument assert methods where the first parameter is the assertion message.
methodCall
- - the MethodCallExpression of the method callmethodName
- - the name of the methodliteralEvaluatesToTrue
- - true if the argument value must evaluate to true using Groovy truthTells you if an ASTNode is a test MethodNode. A method node is a MethodNode and is named test.* or is annotated with
node
- the node to analyze