SELF - the "self" type of this assertion class. Please read "Emulating 'self types' using Java Generics to simplify fluent API implementation"
for more details.public abstract class AbstractBooleanAssert<SELF extends AbstractBooleanAssert<SELF>> extends AbstractAssert<SELF,java.lang.Boolean>
Booleans.| Modifier and Type | Field and Description |
|---|---|
(package private) Booleans |
booleans |
actual, conditions, info, myself, objects| Constructor and Description |
|---|
AbstractBooleanAssert(java.lang.Boolean actual,
java.lang.Class<?> selfType) |
| Modifier and Type | Method and Description |
|---|---|
SELF |
isEqualTo(boolean expected)
Verifies that the actual value is equal to the given one.
|
SELF |
isFalse()
Verifies that the actual value is
false. |
SELF |
isNotEqualTo(boolean other)
Verifies that the actual value is not equal to the given one.
|
SELF |
isTrue()
Verifies that the actual value is
true. |
SELF |
usingComparator(java.util.Comparator<? super java.lang.Boolean> customComparator)
Deprecated.
Custom Comparator is not supported for Boolean comparison.
|
as, as, asList, asString, describedAs, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, equals, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasToString, inBinary, inHexadecimal, is, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, overridingErrorMessage, satisfies, setCustomRepresentation, throwAssertionError, usingDefaultComparator, withFailMessage, withRepresentation, withThreadDumpOnErrorBooleans booleans
public AbstractBooleanAssert(java.lang.Boolean actual,
java.lang.Class<?> selfType)
public SELF isTrue()
true.
Example:
// assertions will pass
assertThat(true).isTrue();
assertThat(Boolean.TRUE).isTrue();
// assertions will fail
assertThat(false).isTrue();
assertThat(Boolean.FALSE).isTrue();this assertion object.java.lang.AssertionError - if the actual value is null.java.lang.AssertionError - if the actual value is not true.public SELF isFalse()
false.
Example:
// assertions will pass
assertThat(false).isFalse();
assertThat(Boolean.FALSE).isFalse();
// assertions will fail
assertThat(true).isFalse();
assertThat(Boolean.TRUE).isFalse();this assertion object.java.lang.AssertionError - if the actual value is null.java.lang.AssertionError - if the actual value is not false.public SELF isEqualTo(boolean expected)
Example:
// assertions will pass
assertThat(true).isEqualTo(true);
assertThat(Boolean.FALSE).isEqualTo(false);
// assertions will fail
assertThat(true).isEqualTo(false);
assertThat(Boolean.TRUE).isEqualTo(false);expected - the given value to compare the actual value to.this assertion object.java.lang.AssertionError - if the actual value is null.java.lang.AssertionError - if the actual value is not equal to the given one.public SELF isNotEqualTo(boolean other)
Example:
// assertions will pass
assertThat(true).isNotEqualTo(false);
assertThat(Boolean.FALSE).isNotEqualTo(true);
// assertions will fail
assertThat(true).isNotEqualTo(true);
assertThat(Boolean.FALSE).isNotEqualTo(false);other - the given value to compare the actual value to.this assertion object.java.lang.AssertionError - if the actual value is null.java.lang.AssertionError - if the actual value is equal to the given one.@Deprecated public final SELF usingComparator(java.util.Comparator<? super java.lang.Boolean> customComparator)
usingComparator in interface Assert<SELF extends AbstractBooleanAssert<SELF>,java.lang.Boolean>usingComparator in class AbstractAssert<SELF extends AbstractBooleanAssert<SELF>,java.lang.Boolean>customComparator - the comparator to use for incoming assertion checks.this assertion object.java.lang.UnsupportedOperationException - if this method is called.