Class AssertionsOnChangeType
java.lang.Object
org.assertj.db.api.assertions.impl.AssertionsOnChangeType
Implements 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
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic <A extends AbstractAssert<?>>
AisCreation(A assertion, org.assertj.core.api.WritableAssertionInfo info, Change change) Verifies that the type of the change is a creation.static <A extends AbstractAssert<?>>
AisDeletion(A assertion, org.assertj.core.api.WritableAssertionInfo info, Change change) Verifies that the type of the change is a deletion.static <A extends AbstractAssert<?>>
AisModification(A assertion, org.assertj.core.api.WritableAssertionInfo info, Change change) Verifies that the type of the change is a modification.static <A extends AbstractAssert<?>>
AisOfType(A assertion, org.assertj.core.api.WritableAssertionInfo info, Change change, ChangeType expected) Verifies that the type of the change is equal to the type in parameter.
-
Method Details
-
isOfType
public static <A extends AbstractAssert<?>> A isOfType(A assertion, org.assertj.core.api.WritableAssertionInfo info, Change change, ChangeType expected) Verifies that the type of the change is equal to the type in parameter.- Type Parameters:
A- The type of the assertion which call this method.- Parameters:
assertion- The assertion which call this method.info- Writable information about an assertion.change- The change.expected- The expected type to compare to.- Returns:
thisassertion object.- Throws:
AssertionError- If the type is different to the type in parameter.
-
isCreation
public static <A extends AbstractAssert<?>> A isCreation(A assertion, org.assertj.core.api.WritableAssertionInfo info, Change change) Verifies that the type of the change is a creation.- Type Parameters:
A- The type of the assertion which call this method.- Parameters:
assertion- The assertion which call this method.info- Writable information about an assertion.change- The change.- Returns:
thisassertion object.- Throws:
AssertionError- If the type of the change is not a creation.
-
isModification
public static <A extends AbstractAssert<?>> A isModification(A assertion, org.assertj.core.api.WritableAssertionInfo info, Change change) Verifies that the type of the change is a modification.- Type Parameters:
A- The type of the assertion which call this method.- Parameters:
assertion- The assertion which call this method.info- Writable information about an assertion.change- The change.- Returns:
thisassertion object.- Throws:
AssertionError- If the type of the change is not a modification.
-
isDeletion
public static <A extends AbstractAssert<?>> A isDeletion(A assertion, org.assertj.core.api.WritableAssertionInfo info, Change change) Verifies that the type of the change is a deletion.- Type Parameters:
A- The type of the assertion which call this method.- Parameters:
assertion- The assertion which call this method.info- Writable information about an assertion.change- The change.- Returns:
thisassertion object.- Throws:
AssertionError- If the type of the change is not a deletion.
-