Polish method names in JdbcTestUtilsTests

This commit is contained in:
Sam Brannen 2013-06-08 21:05:16 +02:00
parent 34e8ee94c4
commit bc9e4ab106
1 changed files with 3 additions and 4 deletions

View File

@ -118,25 +118,24 @@ public class JdbcTestUtilsTests {
}
@Test
public void testDeleteNoWhere() throws Exception {
public void deleteWithoutWhereClause() throws Exception {
given(jdbcTemplate.update("DELETE FROM person")).willReturn(10);
int deleted = JdbcTestUtils.deleteFromTableWhere(jdbcTemplate, "person", null);
assertThat(deleted, equalTo(10));
}
@Test
public void testDeleteWhere() throws Exception {
public void deleteWithWhereClause() throws Exception {
given(jdbcTemplate.update("DELETE FROM person WHERE name = 'Bob' and age > 25")).willReturn(10);
int deleted = JdbcTestUtils.deleteFromTableWhere(jdbcTemplate, "person", "name = 'Bob' and age > 25");
assertThat(deleted, equalTo(10));
}
@Test
public void deleteWhereAndArguments() throws Exception {
public void deleteWithWhereClauseAndArguments() throws Exception {
given(jdbcTemplate.update("DELETE FROM person WHERE name = ? and age > ?", "Bob", 25)).willReturn(10);
int deleted = JdbcTestUtils.deleteFromTableWhere(jdbcTemplate, "person", "name = ? and age > ?", "Bob", 25);
assertThat(deleted, equalTo(10));
}
}