public abstract class SqlAssert extends Object
| Constructor and Description |
|---|
SqlAssert() |
| Modifier and Type | Method and Description |
|---|---|
static void |
assertCountSqlResult(String sql,
DataSource dataSource,
Long countResult)
The SQL given should only return one row with one column, this column should be a number (preferred a count(*)).
|
static void |
assertCountSqlResult(String sql,
Long countResult)
The SQL given should only return one row with one column, this column should be a number (preferred a count(*)).
|
static void |
assertCountSqlResult(String sql,
Long countResult,
String databaseName)
The SQL given should only return one row with one column, this column should be a number (preferred a count(*)).
|
static void |
assertMultipleRowSqlResult(String sql,
DataSource dataSource,
String[]... rows)
To be successful the result of the SQL should return as many rows as the two dimensional array has, each row should be identical to
the given parameter.
|
static void |
assertMultipleRowSqlResult(String sql,
String[]... rows)
To be succesfull the result of the SQL should return as many rows as the two dimensional arrey has, each row should be identical to
the given parameter.
|
static void |
assertMultipleRowSqlResult(String sql,
String databaseName,
String[]... rows)
To be succesfull the result of the SQL should return as many rows as the two dimensional arrey has, each row should be identical to
the given parameter.
|
static void |
assertSingleRowSqlResult(String sql,
DataSource dataSource,
String[] row)
To be successful the result of the SQL should only return one row, this row should be identical to the given parameter.
|
static void |
assertSingleRowSqlResult(String sql,
String[] row)
To be succesfull the result of the SQL should only return one row, this row should be identical to the given parameter.
|
static void |
assertSingleRowSqlResult(String sql,
String databaseName,
String[] row)
To be succesfull the result of the SQL should only return one row, this row should be identical to the given parameter.
|
protected static String[][] |
getItemAsString(String sql,
DataSource dataSource,
Integer columnCount)
Returns the value extracted from the result of the given query.
|
public static void assertSingleRowSqlResult(String sql, String[] row)
DatabaseModule).sql - row - public static void assertSingleRowSqlResult(String sql, String databaseName, String[] row)
DatabaseModule).sql - row - public static void assertMultipleRowSqlResult(String sql, String databaseName, String[]... rows)
DatabaseModule).sql - databaseName - rows - public static void assertMultipleRowSqlResult(String sql, String[]... rows)
DatabaseModule).sql - rows - public static void assertCountSqlResult(String sql, Long countResult)
DatabaseModule).sql - countResult - public static void assertCountSqlResult(String sql, Long countResult, String databaseName)
DatabaseModule).sql - countResult - public static void assertSingleRowSqlResult(String sql, DataSource dataSource, String[] row)
sql - dataSource - row - public static void assertMultipleRowSqlResult(String sql, DataSource dataSource, String[]... rows)
sql - dataSource - rows - public static void assertCountSqlResult(String sql, DataSource dataSource, Long countResult)
sql - dataSource - countResult - protected static String[][] getItemAsString(String sql, DataSource dataSource, Integer columnCount)
UnitilsException is thrown.sql - The sql string for retrieving the itemsdataSource - The data source, not nullCopyright © 2017. All rights reserved.