T
- The "self" type of this assertion class. Please read "Emulating 'self types' using Java Generics to simplify fluent API implementation"
for more details.public interface AssertOnChangeType<T extends AssertOnChangeType<T>>
The different type of changes are enumerated in ChangeType
.
Modifier and Type | Method and Description |
---|---|
T |
isCreation()
Verifies that the type of the change is a creation.
|
T |
isDeletion()
Verifies that the type of the change is a deletion.
|
T |
isModification()
Verifies that the type of the change is a modification.
|
T |
isOfType(ChangeType expected)
Verifies that the type of the change is equal to the type in parameter.
|
T isOfType(ChangeType expected)
Example where the assertion verifies that the change is of type CREATION
:
assertThat(changes).change(1).isOfType(ChangeType.CREATION);
expected
- The expected type to compare to.this
assertion object.AssertionError
- If the type is different to the type in parameter.isCreation()
,
isModification()
,
isDeletion()
,
ChangeAssert.isOfType(org.assertj.db.type.ChangeType)
T isCreation()
Example where the assertion verifies that the change is a creation :
assertThat(changes).change(1).isCreation();
This assertion method is equivalent to :
xxxxx.isOfType(ChangeType.CREATION);
this
assertion object.AssertionError
- If the type of the change is not a creation.ChangeType.CREATION
,
ChangeAssert.isCreation()
T isModification()
Example where the assertion verifies that the change is a modification :
assertThat(changes).change(1).isModification();
This assertion method is equivalent to :
xxxxx.isOfType(ChangeType.MODIFICATION);
this
assertion object.AssertionError
- If the type of the change is not a modification.ChangeType.MODIFICATION
,
ChangeAssert.isModification()
T isDeletion()
Example where the assertion verifies that the change is a deletion :
assertThat(changes).change(1).isDeletion();
This assertion method is equivalent to :
xxxxx.isOfType(ChangeType.DELETION);
this
assertion object.AssertionError
- If the type of the change is not a deletion.ChangeType.DELETION
,
ChangeAssert.isDeletion()
Copyright © 2020 AssertJ. All rights reserved.