Top Description Constructors Methods
org.assertj.core.api

public Class AtomicLongFieldUpdaterAssert<OBJECT>

extends AbstractAtomicFieldUpdaterAssert<AtomicLongFieldUpdaterAssert<OBJECT>, Long, AtomicLongFieldUpdater<OBJECT>, OBJECT>
Class Inheritance
Type Parameters
<OBJECT>
the type of the object holding the updatable field.
Imports
java.util.concurrent.atomic.AtomicLongFieldUpdater

Assertion methods for AtomicLongFieldUpdaters.

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

Author
epeee
Since
2.7.0 / 3.7.0

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected Long
public AtomicLongFieldUpdaterAssert<OBJECT>

Returns:

this assertion object.
hasValue
(Long
the expected value inside the OBJECT.
expectedValue
,
OBJECT
the object holding the updatable field.
obj
)

Overrides org.assertj.core.api.AbstractAtomicFieldUpdaterAssert.hasValue.

Verifies that the actual atomic field updater contains the given value at the given object.
Inherited from org.assertj.core.api.AbstractAtomicFieldUpdaterAssert:
validate

Constructor Detail

AtomicLongFieldUpdaterAssertback to summary
public AtomicLongFieldUpdaterAssert(AtomicLongFieldUpdater<OBJECT> actual)

Method Detail

getActualValueback to summary
protected Long getActualValue(OBJECT obj)

Implements abstract org.assertj.core.api.AbstractAtomicFieldUpdaterAssert.getActualValue.

Annotations
@Override
hasValueback to summary
public AtomicLongFieldUpdaterAssert<OBJECT> hasValue(Long expectedValue, OBJECT obj)

Overrides org.assertj.core.api.AbstractAtomicFieldUpdaterAssert.hasValue.

Verifies that the actual atomic field updater contains the given value at the given object.

Example:

 // person is an instance of a Person class holding a non-private volatile long field (age).
AtomicIntegerFieldUpdater<Person> ageUpdater = AtomicIntegerFieldUpdater.newUpdater(Person.class, "age");

// this assertion succeeds:
ageUpdater.set(person, 25);
assertThat(ageUpdater).hasValue(25, person);

// this assertion fails:
fieldUpdater.set(person, 28);
assertThat(fieldUpdater).hasValue(25, person);
Parameters
expectedValue:Long

the expected value inside the OBJECT.

obj:OBJECT

the object holding the updatable field.

Returns:AtomicLongFieldUpdaterAssert<OBJECT>

this assertion object.

Annotations
@Override
Since
2.7.0 / 3.7.0