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(org.codehaus.groovy.ast.expr.MethodCallExpression methodCall, String methodName, 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(org.codehaus.groovy.ast.expr.MethodCallExpression methodCall, 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(org.codehaus.groovy.ast.expr.MethodCallExpression methodCall, String methodName) |
|
protected static boolean |
isSetUpMethod(org.codehaus.groovy.ast.MethodNode methodNode) |
|
protected static boolean |
isTearDownMethod(org.codehaus.groovy.ast.MethodNode methodNode) |
|
static boolean |
isTestMethod(org.codehaus.groovy.ast.ASTNode node) Tells you if an ASTNode is a test MethodNode. |
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