Polish: assertion arguments should be passed in the correct order,
use assertNull instead of assertEquals(null, value), declare delta as double value in assertEquals
This commit is contained in:
committed by
Juergen Hoeller
parent
39201adca4
commit
0ee505b73e
@@ -47,7 +47,7 @@ public class JdbcDaoSupportTests {
|
||||
dao.afterPropertiesSet();
|
||||
assertEquals("Correct DataSource", ds, dao.getDataSource());
|
||||
assertEquals("Correct JdbcTemplate", ds, dao.getJdbcTemplate().getDataSource());
|
||||
assertEquals("initDao called", test.size(), 1);
|
||||
assertEquals("initDao called", 1, test.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -63,7 +63,7 @@ public class JdbcDaoSupportTests {
|
||||
dao.setJdbcTemplate(template);
|
||||
dao.afterPropertiesSet();
|
||||
assertEquals("Correct JdbcTemplate", dao.getJdbcTemplate(), template);
|
||||
assertEquals("initDao called", test.size(), 1);
|
||||
assertEquals("initDao called", 1, test.size());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -615,7 +615,7 @@ public class SqlQueryTests {
|
||||
ids.add(2);
|
||||
List<Customer> cust = query.findCustomers(ids);
|
||||
|
||||
assertEquals("We got two customers back", cust.size(), 2);
|
||||
assertEquals("We got two customers back", 2, cust.size());
|
||||
assertEquals("First customer id was assigned correctly", cust.get(0).getId(), 1);
|
||||
assertEquals("First customer forename was assigned correctly", cust.get(0).getForename(), "rod");
|
||||
assertEquals("Second customer id was assigned correctly", cust.get(1).getId(), 2);
|
||||
@@ -664,7 +664,7 @@ public class SqlQueryTests {
|
||||
CustomerQuery query = new CustomerQuery(dataSource);
|
||||
List<Customer> cust = query.findCustomers(1);
|
||||
|
||||
assertEquals("We got two customers back", cust.size(), 2);
|
||||
assertEquals("We got two customers back", 2, cust.size());
|
||||
assertEquals("First customer id was assigned correctly", cust.get(0).getId(), 1);
|
||||
assertEquals("First customer forename was assigned correctly", cust.get(0).getForename(), "rod");
|
||||
assertEquals("Second customer id was assigned correctly", cust.get(1).getId(), 2);
|
||||
|
||||
@@ -194,7 +194,7 @@ public class StoredProcedureTests {
|
||||
t.setExceptionTranslator(new SQLStateSQLExceptionTranslator());
|
||||
StoredProcedureConfiguredViaJdbcTemplate sp = new StoredProcedureConfiguredViaJdbcTemplate(t);
|
||||
|
||||
assertEquals(sp.execute(11), 5);
|
||||
assertEquals(5, sp.execute(11));
|
||||
assertEquals(1, t.calls);
|
||||
|
||||
verify(callableStatement).setObject(1, 11, Types.INTEGER);
|
||||
@@ -216,7 +216,7 @@ public class StoredProcedureTests {
|
||||
JdbcTemplate t = new JdbcTemplate();
|
||||
t.setDataSource(dataSource);
|
||||
StoredProcedureConfiguredViaJdbcTemplate sp = new StoredProcedureConfiguredViaJdbcTemplate(t);
|
||||
assertEquals(sp.execute(1106), 4);
|
||||
assertEquals(4, sp.execute(1106));
|
||||
verify(callableStatement).setObject(1, 1106, Types.INTEGER);
|
||||
verify(callableStatement).registerOutParameter(2, Types.INTEGER);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user