public class ThrowableAssertion extends FluentThrowableAssertion<ThrowableAssertion>
Constructor and Description |
---|
ThrowableAssertion(Throwable value)
Creator.
|
Modifier and Type | Method and Description |
---|---|
static ThrowableAssertion |
create(Throwable value)
Creator.
|
ThrowableAssertion |
msg(String msg,
Object... args)
Allows to to specify the assertion failure message.
|
protected ThrowableAssertion |
returns()
Returns the object that the fluent methods on this class should return.
|
ThrowableAssertion |
stderr()
If an error occurs, send the error message to STDERR.
|
ThrowableAssertion |
stdout()
If an error occurs, send the error message to STDOUT.
|
causedBy, contains, doesNotExist, exists, find, is, isType, localizedMessage, message, passes, passes, stackTrace
assertNotNull, assertNotNull, className, error
public ThrowableAssertion(Throwable value)
value
- The throwable being wrapped.public static ThrowableAssertion create(Throwable value)
value
- The throwable being wrapped.ThrowableAssertion
object.protected ThrowableAssertion returns()
FluentAssertion
returns
in class FluentAssertion<ThrowableAssertion>
public ThrowableAssertion msg(String msg, Object... args)
Assertion
String can contain
msg
in class FluentThrowableAssertion<ThrowableAssertion>
msg
- The assertion failure message.args
- Optional message arguments.public ThrowableAssertion stderr()
Assertion
stderr
in class FluentThrowableAssertion<ThrowableAssertion>
public ThrowableAssertion stdout()
Assertion
stdout
in class FluentThrowableAssertion<ThrowableAssertion>
Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.