Package org.assertj.core.api
Class AtomicBooleanAssert
- java.lang.Object
-
- org.assertj.core.api.AbstractAssert<AtomicBooleanAssert,AtomicBoolean>
-
- org.assertj.core.api.AtomicBooleanAssert
-
- All Implemented Interfaces:
Assert<AtomicBooleanAssert,AtomicBoolean>
,Descriptable<AtomicBooleanAssert>
,ExtensionPoints<AtomicBooleanAssert,AtomicBoolean>
public class AtomicBooleanAssert extends AbstractAssert<AtomicBooleanAssert,AtomicBoolean>
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Booleans
booleans
-
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, assertionErrorCreator, conditions, info, myself, objects, throwUnsupportedExceptionOnEquals
-
-
Constructor Summary
Constructors Constructor Description AtomicBooleanAssert(AtomicBoolean actual)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method 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(Comparator<? super AtomicBoolean> customComparator)
Deprecated.Custom Comparator is not supported for Boolean comparison.AtomicBooleanAssert
usingComparator(Comparator<? super AtomicBoolean> customComparator, String customComparatorDescription)
Deprecated.Custom Comparator is not supported for Boolean comparison.-
Methods inherited from class org.assertj.core.api.AbstractAssert
asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, inBinary, inHexadecimal, is, isElementOfCustomAssert, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOf, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingDefaultComparator, usingRecursiveComparison, usingRecursiveComparison, withAssertionState, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.assertj.core.api.Descriptable
as, as, as, describedAs
-
-
-
-
Field Detail
-
booleans
Booleans booleans
-
-
Constructor Detail
-
AtomicBooleanAssert
public AtomicBooleanAssert(AtomicBoolean actual)
-
-
Method Detail
-
isTrue
public AtomicBooleanAssert isTrue()
Verifies that the actual atomic value is true.Example:
// assertion will pass assertThat(new AtomicBoolean(true)).isTrue(); // assertion will fail assertThat(new AtomicBoolean(false)).isTrue();
- Returns:
- this assertion object.
- Throws:
AssertionError
- if the actual atomic isnull
.AssertionError
- if the actual atomic value is false.- Since:
- 2.7.0 / 3.7.0
-
isFalse
public AtomicBooleanAssert isFalse()
Verifies that the actual atomic value is false.Example:
// assertion will pass assertThat(new AtomicBoolean(false)).isFalse(); // assertion will fail assertThat(new AtomicBoolean(true)).isFalse();
- Returns:
- this assertion object.
- Throws:
AssertionError
- if the actual atomic isnull
.AssertionError
- if the actual atomic value is true.- Since:
- 2.7.0 / 3.7.0
-
usingComparator
@Deprecated public AtomicBooleanAssert usingComparator(Comparator<? super AtomicBoolean> customComparator)
Deprecated.Custom Comparator is not supported for Boolean comparison.Do not use this method.- Specified by:
usingComparator
in interfaceAssert<AtomicBooleanAssert,AtomicBoolean>
- Overrides:
usingComparator
in classAbstractAssert<AtomicBooleanAssert,AtomicBoolean>
- Parameters:
customComparator
- the comparator to use for the incoming assertion checks.- Returns:
this
assertion object.- Throws:
UnsupportedOperationException
- if this method is called.
-
usingComparator
@Deprecated public AtomicBooleanAssert usingComparator(Comparator<? super AtomicBoolean> customComparator, String customComparatorDescription)
Deprecated.Custom Comparator is not supported for Boolean comparison.Do not use this method.- Specified by:
usingComparator
in interfaceAssert<AtomicBooleanAssert,AtomicBoolean>
- Overrides:
usingComparator
in classAbstractAssert<AtomicBooleanAssert,AtomicBoolean>
- Parameters:
customComparator
- the comparator to use for the incoming assertion checks.customComparatorDescription
- comparator description to be used in assertion error messages- Returns:
this
assertion object.- Throws:
UnsupportedOperationException
- if this method is called.
-
assertEqual
private void assertEqual(boolean expected)
-
-