Package org.assertj.core.api
Class AtomicIntegerFieldUpdaterAssert<OBJECT>
- java.lang.Object
-
- org.assertj.core.api.AbstractAssert<SELF,ACTUAL>
-
- org.assertj.core.api.AbstractObjectAssert<SELF,ATOMIC>
-
- 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 forAtomicIntegerFieldUpdater
s.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 org.assertj.core.api.AbstractAssert
actual, assertionErrorCreator, conditions, info, myself, objects, throwUnsupportedExceptionOnEquals
-
-
Constructor Summary
Constructors Constructor Description AtomicIntegerFieldUpdaterAssert(AtomicIntegerFieldUpdater<OBJECT> actual)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Integer
getActualValue(OBJECT obj)
AtomicIntegerFieldUpdaterAssert<OBJECT>
hasValue(Integer expectedValue, OBJECT obj)
Verifies that the actual atomic field updater contains the given value at the given object.-
Methods inherited from class org.assertj.core.api.AbstractAtomicFieldUpdaterAssert
validate
-
Methods inherited from class org.assertj.core.api.AbstractObjectAssert
as, as, extracting, extracting, extracting, extracting, extracting, extracting, getComparatorsByType, hasAllNullFieldsOrProperties, hasAllNullFieldsOrPropertiesExcept, hasFieldOrProperty, hasFieldOrPropertyWithValue, hasNoNullFieldsOrProperties, hasNoNullFieldsOrPropertiesExcept, isEqualToComparingFieldByField, isEqualToComparingFieldByFieldRecursively, isEqualToComparingOnlyGivenFields, isEqualToIgnoringGivenFields, isEqualToIgnoringNullFields, newObjectAssert, returns, usingComparatorForFields, usingComparatorForType, usingRecursiveComparison, usingRecursiveComparison, withAssertionState, withComparatorByPropertyOrField, withTypeComparator
-
Methods inherited from class org.assertj.core.api.AbstractAssert
asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, equals, extracting, extracting, failWithActualExpectedAndMessage, 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, overridingErrorMessage, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOf, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.assertj.core.api.Descriptable
describedAs
-
-
-
-
Constructor Detail
-
AtomicIntegerFieldUpdaterAssert
public AtomicIntegerFieldUpdaterAssert(AtomicIntegerFieldUpdater<OBJECT> actual)
-
-
Method Detail
-
hasValue
public AtomicIntegerFieldUpdaterAssert<OBJECT> hasValue(Integer expectedValue, OBJECT obj)
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:
hasValue
in 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
protected Integer getActualValue(OBJECT obj)
- Specified by:
getActualValue
in classAbstractAtomicFieldUpdaterAssert<AtomicIntegerFieldUpdaterAssert<OBJECT>,Integer,AtomicIntegerFieldUpdater<OBJECT>,OBJECT>
-
-