T - the object type.public interface AssertThatObject<T>
This interface is returned by the various methods
assertThat exposed by TestSuite.
| Modifier and Type | Method and Description |
|---|---|
boolean |
is(Matcher<? super T> matching)
Check that the object is matching the passed matcher.
|
default boolean |
is(T compareTo)
Check that the object is the passed one (shortcut to Matcher.equalTo).
|
default boolean |
isA(Class<? super T> clazz)
Check that the object is of a specific class (or subclasses).
|
default boolean |
isNot(Matcher<T> matching)
Check that the object is not matching the passed matcher.
|
default boolean |
isNot(T compareTo)
Check that the object is not the passed one.
|
default boolean |
isNotNull()
Check that the object is not null.
|
default boolean |
isNull()
Check that the object is null.
|
boolean is(Matcher<? super T> matching)
By default, assertion can only be used from the main thread of the
test ; When used from another thread, the assertion will be lost. In the
case the fastFail attribute of @Test
annotation is used, the assertion may not be lost, in case the thread use
an assertion method from the test object instance.
matching - the matcher.Test.fastFail() : If true, then
fail the test, else, return false and the test will be failed
later.The documentation of the fastFail
attribute of the @Test annotation, regarding the action
done by this assertion.default boolean is(T compareTo)
This method is a shortcut to is(equalTo(compareTo)).
By default, assertion can only be used from the main thread of the
test ; When used from another thread, the assertion will be lost. In the
case the fastFail attribute of @Test
annotation is used, the assertion may not be lost, in case the thread use
an assertion method from the test object instance.
compareTo - the value.Test.fastFail() : If true, then
fail the test, else, return false and the test will be failed
later.The documentation of the fastFail
attribute of the @Test annotation, regarding the action
done by this assertion.default boolean isNot(T compareTo)
This method is a shortcut to isNot(equalTo(compareTo)).
By default, assertion can only be used from the main thread of the
test ; When used from another thread, the assertion will be lost. In the
case the fastFail attribute of @Test
annotation is used, the assertion may not be lost, in case the thread use
an assertion method from the test object instance.
compareTo - the valueTest.fastFail() : If true, then
fail the test, else, return false and the test will be failed
later.The documentation of the fastFail
attribute of the @Test annotation, regarding the action
done by this assertion.default boolean isNot(Matcher<T> matching)
This method is a shortcut to is(not(matching)).
By default, assertion can only be used from the main thread of the
test ; When used from another thread, the assertion will be lost. In the
case the fastFail attribute of @Test
annotation is used, the assertion may not be lost, in case the thread use
an assertion method from the test object instance.
matching - the matcherTest.fastFail() : If true, then
fail the test, else, return false and the test will be failed
later.The documentation of the fastFail
attribute of the @Test annotation, regarding the action
done by this assertion.default boolean isNull()
This method is a shortcut to is(nullValue()).
By default, assertion can only be used from the main thread of the
test ; When used from another thread, the assertion will be lost. In the
case the fastFail attribute of @Test
annotation is used, the assertion may not be lost, in case the thread use
an assertion method from the test object instance.
Test.fastFail() : If true, then
fail the test, else, return false and the test will be failed
later.The documentation of the fastFail
attribute of the @Test annotation, regarding the action
done by this assertion.default boolean isNotNull()
This method is a shortcut to is(notNullValue()).
By default, assertion can only be used from the main thread of the
test ; When used from another thread, the assertion will be lost. In the
case the fastFail attribute of @Test
annotation is used, the assertion may not be lost, in case the thread use
an assertion method from the test object instance.
Test.fastFail() : If true, then
fail the test, else, return false and the test will be failed
later.The documentation of the fastFail
attribute of the @Test annotation, regarding the action
done by this assertion.default boolean isA(Class<? super T> clazz)
This method is a shortcut to is(isA(clazz)).
By default, assertion can only be used from the main thread of the
test ; When used from another thread, the assertion will be lost. In the
case the fastFail attribute of @Test
annotation is used, the assertion may not be lost, in case the thread use
an assertion method from the test object instance.
clazz - the classTest.fastFail() : If true, then
fail the test, else, return false and the test will be failed
later.The documentation of the fastFail
attribute of the @Test annotation, regarding the action
done by this assertion.Copyright © 2018 Powerunit. All rights reserved.