| org.apache.commons.jelly.tags.junit.AssertTagSupport org.apache.commons.jelly.tags.junit.AssertThrowsTag
AssertThrowsTag | public class AssertThrowsTag extends AssertTagSupport (Code) | | Runs its body and asserts that an exception is thrown by it. If no
exception is thrown the tag fails. By default all exceptions are caught.
If however expected was specified the body must throw
an exception of the given class, otherwise the assertion fails. The
exception thrown by the body can also be of any subtype of the specified
exception class. The optional var attribute can be specified if
the caught exception is to be exported to a variable.
|
getThrowableClass | protected Class getThrowableClass() throws ClassNotFoundException(Code) | | Returns the Class corresponding to the class
specified by expected . If
expected was either not specified then java. lang.
Throwable is returned.
Otherwise if the class couldn't be
found or doesn't denote an exception class then an exception is thrown.
Class The class of the exception to expect |
setClassLoader | public void setClassLoader(ClassLoader classLoader)(Code) | | Sets the class loader to be used to load the exception type
|
setExpected | public void setExpected(String expected)(Code) | | Sets the class name of exception expected to be thrown by the body. The
class name must be fully qualified and can either be the expected
exception class itself or any supertype of it, but must be a subtype of
java.lang.Throwable .
|
setVar | public void setVar(String var)(Code) | | Sets the variable name to define for this expression.
|
|
|