@Retention(RUNTIME)
@Target({METHOD,TYPE})
public @interface FailsWith
Applying this annotation to a specification has the same effect as applying it to all feature methods that aren't already annotated with @FailsWith.
Modifier and Type | Required Element | Description |
---|---|---|
java.lang.Class<? extends java.lang.Throwable> |
value |
The expected exception type.
|
Modifier and Type | Optional Element | Description |
---|---|---|
java.lang.String |
reason |
The reason for the failure.
|