public class AtomicReferenceAssert<V> extends AbstractAssert<AtomicReferenceAssert<V>,AtomicReference<V>>
actual, info, myself| Constructor and Description |
|---|
AtomicReferenceAssert(AtomicReference<V> actual) |
| Modifier and Type | Method and Description |
|---|---|
AtomicReferenceAssert<V> |
doesNotHaveValue(V expectedValue)
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, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, overridingErrorMessage, setCustomRepresentation, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, withFailMessage, withRepresentation, withThreadDumpOnErrorpublic 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");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 expectedValue)
Example:
// assertion will pass
assertThat(new AtomicReference("foo")).doesNotHaveValue("bar");
// assertion will fail
assertThat(new AtomicReference("foo")).doesNotHaveValue("foo");this assertion object.AssertionError - if the actual atomic is null.AssertionError - if the actual atomic has the given value.Copyright © 2013–2018 AssertJ. All rights reserved.