public class AtomicReferenceAssert<V> extends AbstractAssert<AtomicReferenceAssert<V>,AtomicReference<V>>
actual, info, myself, throwUnsupportedExceptionOnEquals
Constructor and Description |
---|
AtomicReferenceAssert(AtomicReference<V> actual) |
Modifier and Type | Method and Description |
---|---|
AtomicReferenceAssert<V> |
doesNotHaveValue(V nonExpectedValue)
Verifies that the actual atomic has not the given value.
|
AtomicReferenceAssert<V> |
hasValue(V expectedValue)
Verifies that the actual atomic has the given value.
|
as, as, 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, usingComparator, usingComparator, usingDefaultComparator, withFailMessage, withRepresentation, withThreadDumpOnError
public AtomicReferenceAssert(AtomicReference<V> actual)
public AtomicReferenceAssert<V> hasValue(V expectedValue)
Example:
// assertion will pass
assertThat(new AtomicReference("foo")).hasValue("foo");
// assertion will fail
assertThat(new AtomicReference("foo")).hasValue("bar");
expectedValue
- the expected value.this
assertion object.AssertionError
- if the actual atomic is null
.AssertionError
- if the actual atomic does not have the given value.public AtomicReferenceAssert<V> doesNotHaveValue(V nonExpectedValue)
Example:
// assertion will pass
assertThat(new AtomicReference("foo")).doesNotHaveValue("bar");
// assertion will fail
assertThat(new AtomicReference("foo")).doesNotHaveValue("foo");
nonExpectedValue
- the value not expected.this
assertion object.AssertionError
- if the actual atomic is null
.AssertionError
- if the actual atomic has the given value.Copyright © 2014–2019 AssertJ. All rights reserved.