|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
edu.internet2.middleware.grouperClientExt.org.apache.commons.jexl.junit.Asserter
public class Asserter
A utility class for performing JUnit based assertions using Jexl expressions. This class can make it easier to do unit tests using Jexl navigation expressions.
| Constructor Summary | |
|---|---|
Asserter()
Create an asserter. |
|
Asserter(Object variableValue)
This constructor will register the given variableValue as the "this" variable. |
|
| Method Summary | |
|---|---|
void |
assertExpression(String expression,
Object expected)
Performs an assertion that the value of the given Jexl expression evaluates to the given expected value. |
void |
setVariable(String name,
Object value)
Puts a variable of a certain name in the context so that it can be used from assertion expressions. |
| Methods inherited from class junit.framework.Assert |
|---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Asserter()
public Asserter(Object variableValue)
variableValue - 'this'.| Method Detail |
|---|
public void assertExpression(String expression,
Object expected)
throws Exception
expression - is the Jexl expression to evaluateexpected - is the expected value of the expression
Exception - if the expression could not be evaluationed or an assertion
fails
public void setVariable(String name,
Object value)
name - variable namevalue - variable value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||