Class AtomicIntegerFieldUpdaterAssert<OBJECT>
java.lang.Object
org.assertj.core.api.AbstractAssert<AtomicIntegerFieldUpdaterAssert<OBJECT>, AtomicIntegerFieldUpdater<OBJECT>>
org.assertj.core.api.AbstractObjectAssert<AtomicIntegerFieldUpdaterAssert<OBJECT>, AtomicIntegerFieldUpdater<OBJECT>>
org.assertj.core.api.AbstractAtomicFieldUpdaterAssert<AtomicIntegerFieldUpdaterAssert<OBJECT>, Integer, AtomicIntegerFieldUpdater<OBJECT>, OBJECT>
org.assertj.core.api.AtomicIntegerFieldUpdaterAssert<OBJECT>
- Type Parameters:
OBJECT- the type of the object holding the updatable field.
- All Implemented Interfaces:
Assert<AtomicIntegerFieldUpdaterAssert<OBJECT>, AtomicIntegerFieldUpdater<OBJECT>>, Descriptable<AtomicIntegerFieldUpdaterAssert<OBJECT>>, ExtensionPoints<AtomicIntegerFieldUpdaterAssert<OBJECT>, AtomicIntegerFieldUpdater<OBJECT>>
public class AtomicIntegerFieldUpdaterAssert<OBJECT>
extends AbstractAtomicFieldUpdaterAssert<AtomicIntegerFieldUpdaterAssert<OBJECT>, Integer, AtomicIntegerFieldUpdater<OBJECT>, OBJECT>
Assertion methods for
AtomicIntegerFieldUpdaters.
To create an instance of this class, invoke .
Assertions.assertThat(AtomicIntegerFieldUpdater)
- Since:
- 2.7.0 / 3.7.0
- Author:
- epeee
-
Field Summary
Fields inherited from class AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected IntegergetActualValue(OBJECT obj) Verifies that the actual atomic field updater contains the given value at the given object.Methods inherited from class AbstractAtomicFieldUpdaterAssert
validateMethods inherited from class AbstractObjectAssert
as, as, doesNotReturn, extracting, extracting, extracting, extracting, extracting, extracting, extractingForProxy, getComparatorsByType, hasAllNullFieldsOrProperties, hasAllNullFieldsOrPropertiesExcept, hasFieldOrProperty, hasFieldOrPropertyWithValue, hasNoNullFieldsOrProperties, hasNoNullFieldsOrPropertiesExcept, hasOnlyFields, isEqualToComparingFieldByField, isEqualToComparingFieldByFieldRecursively, isEqualToComparingOnlyGivenFields, isEqualToIgnoringGivenFields, isEqualToIgnoringNullFields, newObjectAssert, returns, usingComparatorForFields, usingComparatorForType, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparisonMethods inherited from class AbstractAssert
actual, areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, doesNotMatch, doesNotMatch, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, hasToString, inBinary, inHexadecimal, is, isElementOfCustomAssert, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, usingEquals, usingEquals, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnErrorMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Descriptable
as, describedAs, describedAs
-
Constructor Details
-
AtomicIntegerFieldUpdaterAssert
-
-
Method Details
-
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 int 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);- Overrides:
hasValuein classAbstractAtomicFieldUpdaterAssert<AtomicIntegerFieldUpdaterAssert<OBJECT>, Integer, AtomicIntegerFieldUpdater<OBJECT>, OBJECT>- Parameters:
expectedValue- the expected value inside theOBJECT.obj- the object holding the updatable field.- Returns:
- this assertion object.
- Since:
- 2.7.0 / 3.7.0
-
getActualValue
- Specified by:
getActualValuein classAbstractAtomicFieldUpdaterAssert<AtomicIntegerFieldUpdaterAssert<OBJECT>, Integer, AtomicIntegerFieldUpdater<OBJECT>, OBJECT>
-