Assert<SELF,ACTUAL>
, Descriptable<VALUE>
, ExtensionPoints<SELF,ACTUAL>
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
Constructor | Description |
---|---|
AtomicStampedReferenceAssert(AtomicStampedReference<VALUE> actual) |
Modifier and Type | Method | 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. |
asList, asString, describedAs, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, equals, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, 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, overridingErrorMessage, satisfies, setCustomRepresentation, throwAssertionError, usingComparator, usingDefaultComparator, withFailMessage, withRepresentation, withThreadDumpOnError
as, as, defaultTypeComparators, extracting, extracting, hasFieldOrProperty, hasFieldOrPropertyWithValue, hasNoNullFieldsOrProperties, hasNoNullFieldsOrPropertiesExcept, isEqualToComparingFieldByField, isEqualToComparingFieldByFieldRecursively, isEqualToComparingOnlyGivenFields, isEqualToIgnoringGivenFields, isEqualToIgnoringNullFields, returns, usingComparatorForFields, usingComparatorForType
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. All rights reserved.