Browse Source

Polish method names in JdbcTestUtilsTests

pull/299/merge
Sam Brannen 12 years ago
parent
commit
bc9e4ab106
  1. 7
      spring-test/src/test/java/org/springframework/test/jdbc/JdbcTestUtilsTests.java

7
spring-test/src/test/java/org/springframework/test/jdbc/JdbcTestUtilsTests.java

@ -118,25 +118,24 @@ public class JdbcTestUtilsTests { @@ -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));
}
}

Loading…
Cancel
Save