Java 类org.springframework.jdbc.core.test.SpacePerson 实例源码

项目:spring4-understanding    文件:BeanPropertyRowMapperTests.java   
@Test
public void testQueryWithSpaceInColumnName() throws Exception {
    Mock mock = new Mock(MockType.THREE);
    List<SpacePerson> result = mock.getJdbcTemplate().query(
            "select last_name as \"Last Name\", age, birth_date, balance from people",
            new BeanPropertyRowMapper<SpacePerson>(SpacePerson.class));
    assertEquals(1, result.size());
    verifySpacePerson(result.get(0));
    mock.verifyClosed();
}
项目:class-guard    文件:BeanPropertyRowMapperTests.java   
@Test
public void testQueryWithSpaceInColumnName() throws Exception {
    Mock mock = new Mock(MockType.THREE);
    List<SpacePerson> result = mock.getJdbcTemplate().query(
            "select last_name as \"Last Name\", age, birth_date, balance from people",
            new BeanPropertyRowMapper<SpacePerson>(SpacePerson.class));
    assertEquals(1, result.size());
    verifySpacePerson(result.get(0));
    mock.verifyClosed();
}
项目:spring4-understanding    文件:AbstractRowMapperTests.java   
protected void verifySpacePerson(SpacePerson bean) {
    assertEquals("Bubba", bean.getLastName());
    assertEquals(22L, bean.getAge());
    assertEquals(new java.util.Date(1221222L), bean.getBirthDate());
    assertEquals(new BigDecimal("1234.56"), bean.getBalance());
}
项目:class-guard    文件:AbstractRowMapperTests.java   
protected void verifySpacePerson(SpacePerson bean) {
    assertEquals("Bubba", bean.getLastName());
    assertEquals(22L, bean.getAge());
    assertEquals(new java.util.Date(1221222L), bean.getBirthDate());
    assertEquals(new BigDecimal("1234.56"), bean.getBalance());
}