|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fest.assertions.api.AbstractAssert<ThrowableAssert,Throwable>
org.fest.assertions.api.ThrowableAssert
public class ThrowableAssert
Assertion methods for
s.
Throwable
To create a new instance of this class, invoke
.
Assertions.assertThat(Throwable)
Field Summary |
---|
Fields inherited from class org.fest.assertions.api.AbstractAssert |
---|
actual, myself |
Constructor Summary | |
---|---|
protected |
ThrowableAssert(Throwable actual)
|
Method Summary | |
---|---|
ThrowableAssert |
hasMessage(String message)
Verifies that the message of the actual Throwable is equal to the given one. |
ThrowableAssert |
hasMessageContaining(String description)
Verifies that the message of the actual Throwable contains with the given description. |
ThrowableAssert |
hasMessageEndingWith(String description)
Verifies that the message of the actual Throwable ends with the given description. |
ThrowableAssert |
hasMessageStartingWith(String description)
Verifies that the message of the actual Throwable starts with the given description. |
ThrowableAssert |
hasNoCause()
Verifies that the actual Throwable does not have a cause. |
Methods inherited from class org.fest.assertions.api.AbstractAssert |
---|
as, as, describedAs, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, equals, has, hashCode, hasSameClassAs, is, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, usingComparator, usingDefaultComparator |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ThrowableAssert(Throwable actual)
Method Detail |
---|
public ThrowableAssert hasMessage(String message)
Throwable
is equal to the given one.
message
- the expected message.
AssertionError
- if the actual Throwable
is null
.
AssertionError
- if the message of the actual Throwable
is not equal to the given one.public ThrowableAssert hasNoCause()
Throwable
does not have a cause.
AssertionError
- if the actual Throwable
is null
.
AssertionError
- if the actual Throwable
has a cause.public ThrowableAssert hasMessageStartingWith(String description)
Throwable
starts with the given description.
description
- the description expected to start the actual Throwable
's message.
AssertionError
- if the actual Throwable
is null
.
AssertionError
- if the message of the actual Throwable
does not start with the given description.public ThrowableAssert hasMessageContaining(String description)
Throwable
contains with the given description.
description
- the description expected to be contained in the actual Throwable
's message.
AssertionError
- if the actual Throwable
is null
.
AssertionError
- if the message of the actual Throwable
does not contain the given description.public ThrowableAssert hasMessageEndingWith(String description)
Throwable
ends with the given description.
description
- the description expected to end the actual Throwable
's message.
AssertionError
- if the actual Throwable
is null
.
AssertionError
- if the message of the actual Throwable
does not end with the given description.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |