Top Fields Constructors Methods
org.assertj.core.api

public Class AtomicBooleanAssert

extends AbstractAssert<AtomicBooleanAssert, AtomicBoolean>
Class Inheritance
Static Imports
org.assertj.core.error.ShouldHaveValue.shouldHaveValue

Field Summary

Inherited from org.assertj.core.api.AbstractAssert:
actualassertionErrorCreatorconditionscustomRepresentationinfomyselfobjectsprintAssertionsDescriptionthrowUnsupportedExceptionOnEquals

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
assertEqual(boolean expected)

public AtomicBooleanAssert

Returns:

this assertion object.
isFalse
()

Verifies that the actual atomic value is false.

public AtomicBooleanAssert

Returns:

this assertion object.
isTrue
()

Verifies that the actual atomic value is true.

public AtomicBooleanAssert
usingComparator(Comparator<? super AtomicBoolean>
the comparator to use for the incoming assertion checks.
customComparator
)

Overrides org.assertj.core.api.AbstractAssert.usingComparator.

Implements org.assertj.core.api.Assert.usingComparator.

Deprecated Custom Comparator is not supported for Boolean comparison.
Do not use this method.
public AtomicBooleanAssert
usingComparator(Comparator<? super AtomicBoolean>
the comparator to use for the incoming assertion checks.
customComparator
,
String
comparator description to be used in assertion error messages
customComparatorDescription
)

Overrides org.assertj.core.api.AbstractAssert.usingComparator.

Implements org.assertj.core.api.Assert.usingComparator.

Deprecated Custom Comparator is not supported for Boolean comparison.
Do not use this method.
Inherited from org.assertj.core.api.AbstractAssert:
areEqualasInstanceOfasListassertionErrorasStringdescribedAsdescriptionTextdoesNotHavedoesNotHaveSameClassAsdoesNotHaveSameHashCodeAsdoesNotHaveToStringdoesNotHaveToStringequalsextractingextractingfailurefailureWithActualExpectedfailWithActualExpectedAndMessagefailWithMessagegetWritableAssertionInfohashashCodehasSameClassAshasSameHashCodeAshasToStringhasToStringinBinaryinHexadecimalisisElementOfCustomAssertisEqualToisExactlyInstanceOfisInisInisInstanceOfisInstanceOfAnyisInstanceOfSatisfyingisNotisNotEqualToisNotExactlyInstanceOfisNotInisNotInisNotInstanceOfisNotInstanceOfAnyisNotNullisNotOfAnyClassInisNotSameAsisNullisOfAnyClassInisSameAsmatchesmatchesnewListAssertInstanceoverridingErrorMessageoverridingErrorMessagesatisfiessatisfiessatisfiessatisfiesAnyOfsatisfiesAnyOfsatisfiesAnyOfForProxysatisfiesForProxysetCustomRepresentationsetDescriptionConsumersetPrintAssertionsDescriptionthrowAssertionErrorusingDefaultComparatorusingRecursiveAssertionusingRecursiveAssertionusingRecursiveComparisonusingRecursiveComparisonwithAssertionStatewithFailMessagewithFailMessagewithRepresentationwithThreadDumpOnError

Constructor Detail

AtomicBooleanAssertback to summary
public AtomicBooleanAssert(AtomicBoolean actual)

Method Detail

assertEqualback to summary
private void assertEqual(boolean expected)
isFalseback to summary
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:AtomicBooleanAssert

this assertion object.

Exceptions
AssertionError:
  • if the actual atomic is null.
  • if the actual atomic value is true.
Since
2.7.0 / 3.7.0
isTrueback to summary
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:AtomicBooleanAssert

this assertion object.

Exceptions
AssertionError:
  • if the actual atomic is null.
  • if the actual atomic value is false.
Since
2.7.0 / 3.7.0
usingComparatorback to summary
public AtomicBooleanAssert usingComparator(Comparator<? super AtomicBoolean> customComparator)

Overrides org.assertj.core.api.AbstractAssert.usingComparator.

Implements org.assertj.core.api.Assert.usingComparator.

Deprecated

Custom Comparator is not supported for Boolean comparison.

Do not use this method.

Parameters
customComparator:Comparator<? super AtomicBoolean>

Doc from org.assertj.core.api.Assert.usingComparator.

the comparator to use for the incoming assertion checks.

Returns:AtomicBooleanAssert

Doc from org.assertj.core.api.Assert.usingComparator.

this assertion object.

Annotations
@Override
@Deprecated
Exceptions
UnsupportedOperationException:
if this method is called.
usingComparatorback to summary
public AtomicBooleanAssert usingComparator(Comparator<? super AtomicBoolean> customComparator, String customComparatorDescription)

Overrides org.assertj.core.api.AbstractAssert.usingComparator.

Implements org.assertj.core.api.Assert.usingComparator.

Deprecated

Custom Comparator is not supported for Boolean comparison.

Do not use this method.

Parameters
customComparator:Comparator<? super AtomicBoolean>

Doc from org.assertj.core.api.Assert.usingComparator.

the comparator to use for the incoming assertion checks.

customComparatorDescription:String

Doc from org.assertj.core.api.Assert.usingComparator.

comparator description to be used in assertion error messages

Returns:AtomicBooleanAssert

Doc from org.assertj.core.api.Assert.usingComparator.

this assertion object.

Annotations
@Override
@Deprecated
Exceptions
UnsupportedOperationException:
if this method is called.