public class AtomicBooleanAssert extends AbstractAssert<AtomicBooleanAssert,java.util.concurrent.atomic.AtomicBoolean>
Modifier and Type | Field and Description |
---|---|
(package private) Booleans |
booleans |
actual, conditions, info, myself, objects
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.
|
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, 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 incoming assertion checks.this
assertion object.java.lang.UnsupportedOperationException
- if this method is called.private void assertEqual(boolean expected)