Package org.assertj.db.api.assertions
Interface AssertOnChangeType<T extends AssertOnChangeType<T>>
- Type Parameters:
T- The "self" type of this assertion class. Please read "Emulating 'self types' using Java Generics to simplify fluent API implementation" for more details.
- All Known Implementing Classes:
ChangeAssert
public interface AssertOnChangeType<T extends AssertOnChangeType<T>>
Defines the assertion methods on the type of a change (creation, modification or deletion of a row).
The different type of changes are enumerated in ChangeType.
- Author:
- Régis Pouiller
-
Method Summary
Modifier and TypeMethodDescriptionVerifies that the type of the change is a creation.Verifies that the type of the change is a deletion.Verifies that the type of the change is a modification.isOfType(ChangeType expected) Verifies that the type of the change is equal to the type in parameter.
-
Method Details
-
isOfType
Verifies that the type of the change is equal to the type in parameter.Example where the assertion verifies that the change is of type
CREATION:assertThat(changes).change(1).isOfType(ChangeType.CREATION);- Parameters:
expected- The expected type to compare to.- Returns:
thisassertion object.- Throws:
AssertionError- If the type is different to the type in parameter.- See Also:
-
isCreation
T isCreation()Verifies that the type of the change is a creation.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);- Returns:
thisassertion object.- Throws:
AssertionError- If the type of the change is not a creation.- See Also:
-
isModification
T isModification()Verifies that the type of the change is a modification.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);- Returns:
thisassertion object.- Throws:
AssertionError- If the type of the change is not a modification.- See Also:
-
isDeletion
T isDeletion()Verifies that the type of the change is a deletion.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);- Returns:
thisassertion object.- Throws:
AssertionError- If the type of the change is not a deletion.- See Also:
-