Java Code Examples for org.springframework.test.jdbc.JdbcTestUtils#countRowsInTable()

The following examples show how to use org.springframework.test.jdbc.JdbcTestUtils#countRowsInTable() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: find   File: AbstractSavedQueryIT.java    License: MIT License 6 votes vote down vote up
@Test
public void checkUserNotDuplicated() throws Exception {
    final SavedQuery savedQuery1 = new SavedQuery.Builder()
            .setTitle("title1")
            .setMinScore(0)
            .build();

    final SavedQuery savedQuery2 = new SavedQuery.Builder()
            .setTitle("title2")
            .setMinScore(0)
            .build();

    createSavedQuery(savedQuery1);
    createSavedQuery(savedQuery2);

    final int userRows = JdbcTestUtils.countRowsInTable(jdbcTemplate, "find." + UserEntity.Table.NAME);
    assertThat(userRows, is(1));
}
 
Example 2
private int countRowsInTable(String tableName) {
	return JdbcTestUtils.countRowsInTable(this.jdbcTemplate, tableName);
}
 
Example 3
private int countRowsInTable(String tableName) {
	return JdbcTestUtils.countRowsInTable(this.jdbcTemplate, tableName);
}
 
Example 4
protected int countRowsInTable(String tableName) {
	return JdbcTestUtils.countRowsInTable(this.jdbcTemplate, tableName);
}
 
Example 5
protected int countRowsInTable(String tableName) {
	return JdbcTestUtils.countRowsInTable(this.jdbcTemplate, tableName);
}
 
Example 6
private int countRowsInTable(String tableName) {
	return JdbcTestUtils.countRowsInTable(this.jdbcTemplate, tableName);
}
 
Example 7
private int countRowsInTable(String tableName) {
	return JdbcTestUtils.countRowsInTable(this.jdbcTemplate, tableName);
}
 
Example 8
protected int countRowsInTable(String tableName) {
	return JdbcTestUtils.countRowsInTable(this.jdbcTemplate, tableName);
}
 
Example 9
protected int countRowsInTable(String tableName) {
	return JdbcTestUtils.countRowsInTable(this.jdbcTemplate, tableName);
}
 
Example 10
protected int countRowsInTable(String tableName) {
	return JdbcTestUtils.countRowsInTable(this.jdbcTemplate, tableName);
}
 
Example 11
protected int countRowsInTable(String tableName) {
	return JdbcTestUtils.countRowsInTable(this.jdbcTemplate, tableName);
}
 
Example 12
private int countNumEvents() {
	return JdbcTestUtils.countRowsInTable(jdbcTemplate, "event");
}
 
Example 13
/**
 * Convenience method for counting the rows in the given table.
 * @param tableName table name to count rows in
 * @return the number of rows in the table
 * @see JdbcTestUtils#countRowsInTable
 */
protected int countRowsInTable(String tableName) {
	return JdbcTestUtils.countRowsInTable(this.jdbcTemplate, tableName);
}
 
Example 14
/**
 * Convenience method for counting the rows in the given table.
 * @param tableName table name to count rows in
 * @return the number of rows in the table
 * @see JdbcTestUtils#countRowsInTable
 */
protected int countRowsInTable(String tableName) {
	return JdbcTestUtils.countRowsInTable(this.jdbcTemplate, tableName);
}
 
Example 15
/**
 * Convenience method for counting the rows in the given table.
 * @param tableName table name to count rows in
 * @return the number of rows in the table
 * @see JdbcTestUtils#countRowsInTable
 */
protected int countRowsInTable(String tableName) {
	return JdbcTestUtils.countRowsInTable(this.jdbcTemplate, tableName);
}
 
Example 16
/**
 * Convenience method for counting the rows in the given table.
 * @param tableName table name to count rows in
 * @return the number of rows in the table
 * @see JdbcTestUtils#countRowsInTable
 */
protected int countRowsInTable(String tableName) {
	return JdbcTestUtils.countRowsInTable(this.jdbcTemplate, tableName);
}
 
Example 17
/**
 * Convenience method for counting the rows in the given table.
 * @param tableName table name to count rows in
 * @return the number of rows in the table
 * @see JdbcTestUtils#countRowsInTable
 */
protected int countRowsInTable(String tableName) {
	return JdbcTestUtils.countRowsInTable(this.jdbcTemplate, tableName);
}
 
Example 18
/**
 * Convenience method for counting the rows in the given table.
 * @param tableName table name to count rows in
 * @return the number of rows in the table
 * @see JdbcTestUtils#countRowsInTable
 */
protected int countRowsInTable(String tableName) {
	return JdbcTestUtils.countRowsInTable(this.jdbcTemplate, tableName);
}