public class AtomicBooleanAssert extends AbstractAssert<AtomicBooleanAssert,java.util.concurrent.atomic.AtomicBoolean>
Modifier and Type | Field and Description |
---|---|
(package private) Booleans |
booleans |
actual, assertionErrorCreator, conditions, info, myself, objects, throwUnsupportedExceptionOnEquals
Constructor and Description |
---|
AtomicBooleanAssert(java.util.concurrent.atomic.AtomicBoolean actual) |
Modifier and Type | Method and Description |
---|---|
private void |
assertEqual(boolean expected) |
AtomicBooleanAssert |
isFalse()
Verifies that the actual atomic value is false.
|
AtomicBooleanAssert |
isTrue()
Verifies that the actual atomic value is true.
|
AtomicBooleanAssert |
usingComparator(java.util.Comparator<? super java.util.concurrent.atomic.AtomicBoolean> customComparator)
Deprecated.
Custom Comparator is not supported for Boolean comparison.
|
AtomicBooleanAssert |
usingComparator(java.util.Comparator<? super java.util.concurrent.atomic.AtomicBoolean> customComparator,
java.lang.String customComparatorDescription)
Deprecated.
Custom Comparator is not supported for Boolean comparison.
|
as, as, asInstanceOf, asList, asString, describedAs, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, equals, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, 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, newListAssertInstance, overridingErrorMessage, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, setCustomRepresentation, throwAssertionError, usingDefaultComparator, withAssertionState, withFailMessage, withRepresentation, withThreadDumpOnError
Booleans booleans
public AtomicBooleanAssert(java.util.concurrent.atomic.AtomicBoolean actual)
public AtomicBooleanAssert isTrue()
Example:
// assertion will pass
assertThat(new AtomicBoolean(true)).isTrue();
// assertion will fail
assertThat(new AtomicBoolean(false)).isTrue();
java.lang.AssertionError
- if the actual atomic is null
.java.lang.AssertionError
- if the actual atomic value is false.public AtomicBooleanAssert isFalse()
Example:
// assertion will pass
assertThat(new AtomicBoolean(false)).isFalse();
// assertion will fail
assertThat(new AtomicBoolean(true)).isFalse();
java.lang.AssertionError
- if the actual atomic is null
.java.lang.AssertionError
- if the actual atomic value is true.@Deprecated public AtomicBooleanAssert usingComparator(java.util.Comparator<? super java.util.concurrent.atomic.AtomicBoolean> customComparator)
usingComparator
in interface Assert<AtomicBooleanAssert,java.util.concurrent.atomic.AtomicBoolean>
usingComparator
in class AbstractAssert<AtomicBooleanAssert,java.util.concurrent.atomic.AtomicBoolean>
customComparator
- the comparator to use for the incoming assertion checks.this
assertion object.java.lang.UnsupportedOperationException
- if this method is called.@Deprecated public AtomicBooleanAssert usingComparator(java.util.Comparator<? super java.util.concurrent.atomic.AtomicBoolean> customComparator, java.lang.String customComparatorDescription)
usingComparator
in interface Assert<AtomicBooleanAssert,java.util.concurrent.atomic.AtomicBoolean>
usingComparator
in class AbstractAssert<AtomicBooleanAssert,java.util.concurrent.atomic.AtomicBoolean>
customComparator
- the comparator to use for the incoming assertion checks.customComparatorDescription
- comparator description to be used in assertion error messagesthis
assertion object.java.lang.UnsupportedOperationException
- if this method is called.private void assertEqual(boolean expected)