Package org.assertj.db.api.assertions
Interface AssertOnDataType<T extends AssertOnDataType<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 AssertOnDataType<T extends AssertOnDataType<T>>
Defines the assertion methods on the type of data (from a table or from a request).
The different type of data are enumerated in DataType.
- Author:
- Régis Pouiller
-
Method Summary
Modifier and TypeMethodDescriptionisOnDataType(DataType expected) Verifies that the data type on which is the change is equal to the type in parameter.Verifies that the data type on which is the change is a request.Verifies that the data type on which is the change is a table.Verifies that the change is on a table with the name in parameter.
-
Method Details
-
isOnDataType
Verifies that the data type on which is the change is equal to the type in parameter.Example where the assertion verifies that the change is on data type
TABLE:assertThat(changes).change(1).isOnDataType(DataType.TABLE);- 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:
-
isOnTable
T isOnTable()Verifies that the data type on which is the change is a table.Example where the assertion verifies that the change is on data type
TABLE:assertThat(changes).change(1).isOnTable();This assertion method is equivalent to :
xxxxx.isOnDataType(DataType.TABLE);- Returns:
thisassertion object.- Throws:
AssertionError- If the type of data is not table.- See Also:
-
isOnRequest
T isOnRequest()Verifies that the data type on which is the change is a request.Example where the assertion verifies that the change is on data type
REQUEST:assertThat(changes).change(1).isOnRequest();This assertion method is equivalent to :
xxxxx.isOnDataType(DataType.REQUEST);- Returns:
thisassertion object.- Throws:
AssertionError- If the type of data is not request.- See Also:
-
isOnTable
Verifies that the change is on a table with the name in parameter.Example where the assertion verifies that the change is on
TABLEcalled movie :assertThat(changes).change(1).isOnTable("movie");- Parameters:
name- The name of the table on which is the change.- Returns:
thisassertion object.- Throws:
AssertionError- If the type of data is not table or if the table have a different name.NullPointerException- If the name in parameter isnull.- See Also:
-