|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.unitils.database.sqlassert.SqlAssert
public abstract class SqlAssert
Assertion class to verify content in the database, by specifying your own SQL and checking the result. todo td refactor
| Constructor Summary | |
|---|---|
SqlAssert()
|
|
| Method Summary | |
|---|---|
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 |
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 |
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. |
protected static String[][] |
getItemAsString(String sql,
DataSource dataSource,
Integer columnCount)
Returns the value extracted from the result of the given query. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SqlAssert()
| Method Detail |
|---|
public static void assertSingleRowSqlResult(String sql,
String[] row)
DatabaseModule).
sql - row -
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 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 null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||