Top Description Constructors Methods
org.assertj.core.api

public Class AtomicStampedReferenceAssert<VALUE>

extends AbstractAtomicReferenceAssert<AtomicStampedReferenceAssert<VALUE>, VALUE, AtomicStampedReference<VALUE>>
Class Inheritance
Static Imports
org.assertj.core.error.ShouldHaveStamp.shouldHaveStamp

Assertion methods for AtomicStampedReferences.

To create an instance of this class, invoke Assertions#assertThat(AtomicStampedReference).

Author
epeee
Since
2.7.0 / 3.7.0

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected VALUE
public AtomicStampedReferenceAssert<VALUE>

Returns:

this assertion object.
hasReference
(VALUE
the expected value inside the AtomicStampedReference.
expectedValue
)

Overrides org.assertj.core.api.AbstractAtomicReferenceAssert.hasReference.

Verifies that the actual AtomicStampedReference contains the given value.
public AtomicStampedReferenceAssert<VALUE>

Returns:

this assertion object.
hasStamp
(int
the expected stamp inside the AtomicStampedReference.
expectedStamp
)

Verifies that the actual AtomicStampedReference has the given stamp.

Constructor Detail

AtomicStampedReferenceAssertback to summary
public AtomicStampedReferenceAssert(AtomicStampedReference<VALUE> actual)

Method Detail

getReferenceback to summary
protected VALUE getReference()

Implements abstract org.assertj.core.api.AbstractAtomicReferenceAssert.getReference.

Annotations
@Override
hasReferenceback to summary
public AtomicStampedReferenceAssert<VALUE> hasReference(VALUE expectedValue)

Overrides org.assertj.core.api.AbstractAtomicReferenceAssert.hasReference.

Verifies that the actual 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");
Parameters
expectedValue:VALUE

the expected value inside the AtomicStampedReference.

Returns:AtomicStampedReferenceAssert<VALUE>

this assertion object.

Annotations
@Override
Since
2.7.0 / 3.7.0
hasStampback to summary
public AtomicStampedReferenceAssert<VALUE> hasStamp(int expectedStamp)

Verifies that the actual 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);
Parameters
expectedStamp:int

the expected stamp inside the AtomicStampedReference.

Returns:AtomicStampedReferenceAssert<VALUE>

this assertion object.

Since
2.7.0 / 3.7.0