public class AtomicStampedReferenceAssert<VALUE> extends AbstractAtomicReferenceAssert<AtomicStampedReferenceAssert<VALUE>,VALUE,AtomicStampedReference<VALUE>>
AtomicStampedReference
s.
To create an instance of this class, invoke
.
Assertions.assertThat(AtomicStampedReference)
actual, info, myself, throwUnsupportedExceptionOnEquals
Constructor and Description |
---|
AtomicStampedReferenceAssert(AtomicStampedReference<VALUE> actual) |
Modifier and Type | Method and Description |
---|---|
protected VALUE |
getReference() |
AtomicStampedReferenceAssert<VALUE> |
hasReference(VALUE expectedValue)
Verifies that the actual
AtomicStampedReference contains the given value. |
AtomicStampedReferenceAssert<VALUE> |
hasStamp(int expectedStamp)
Verifies that the actual
AtomicStampedReference has the given stamp. |
as, as, extracting, extracting, extracting, getComparatorsByType, hasAllNullFieldsOrProperties, hasAllNullFieldsOrPropertiesExcept, hasFieldOrProperty, hasFieldOrPropertyWithValue, hasNoNullFieldsOrProperties, hasNoNullFieldsOrPropertiesExcept, isEqualToComparingFieldByField, isEqualToComparingFieldByFieldRecursively, isEqualToComparingOnlyGivenFields, isEqualToIgnoringGivenFields, isEqualToIgnoringNullFields, newObjectAssert, returns, usingComparatorForFields, usingComparatorForType, usingRecursiveComparison, usingRecursiveComparison
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 AtomicStampedReferenceAssert(AtomicStampedReference<VALUE> actual)
public AtomicStampedReferenceAssert<VALUE> hasReference(VALUE expectedValue)
AtomicStampedReference
contains the given value.
Example:
AtomicStampedReferenceAssert<String> ref = new AtomicStampedReferenceAssert<>("foo", 123);
// this assertion succeeds:
assertThat(ref).hasValue("foo");
// this assertion fails:
assertThat(ref).hasValue("bar");
hasReference
in class AbstractAtomicReferenceAssert<AtomicStampedReferenceAssert<VALUE>,VALUE,AtomicStampedReference<VALUE>>
expectedValue
- the expected value inside the AtomicStampedReference
.protected VALUE getReference()
getReference
in class AbstractAtomicReferenceAssert<AtomicStampedReferenceAssert<VALUE>,VALUE,AtomicStampedReference<VALUE>>
public AtomicStampedReferenceAssert<VALUE> hasStamp(int expectedStamp)
AtomicStampedReference
has the given stamp.
Examples:
// this assertion succeeds:
assertThat(new AtomicStampedReference<>("actual", 1234)).hasStamp(1234);
// this assertion fails:
assertThat(new AtomicStampedReference<>("actual", 1234)).hasStamp(5678);
expectedStamp
- the expected stamp inside the AtomicStampedReference
.Copyright © 2014–2019 AssertJ. All rights reserved.