GroovyAssert class instead@Deprecated
public class GroovyAssert
extends java.lang.Object
| Constructor | Description |
|---|---|
GroovyAssert() |
Deprecated.
|
| Modifier and Type | Method | Description |
|---|---|---|
static java.lang.Throwable |
shouldFail(Closure code) |
Deprecated.
Asserts that the given code closure fails when it is evaluated
|
static java.lang.Throwable |
shouldFail(java.lang.Class clazz,
Closure code) |
Deprecated.
Asserts that the given code closure fails when it is evaluated
and that a particular exception is thrown.
|
static java.lang.Throwable |
shouldFailWithCause(java.lang.Class clazz,
Closure code) |
Deprecated.
Asserts that the given code closure fails when it is evaluated
and that a particular exception can be attributed to the cause.
|
public static java.lang.Throwable shouldFail(Closure code)
code - the code expected to throw the exceptionpublic static java.lang.Throwable shouldFail(java.lang.Class clazz,
Closure code)
clazz - the class of the expected exceptioncode - the closure that should failpublic static java.lang.Throwable shouldFailWithCause(java.lang.Class clazz,
Closure code)
If a match is found the error message associated with the matching exception is returned. If no match was found the method will fail.
clazz - the class of the expected exceptioncode - the closure that should fail