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

项目:spring4-understanding    文件:BeanPropertyRowMapperTests.java   
@Test
public void testMappingWithUnpopulatedFieldsNotChecked() throws Exception {
    Mock mock = new Mock();
    List<ExtendedPerson> result = mock.getJdbcTemplate().query(
            "select name, age, birth_date, balance from people",
            new BeanPropertyRowMapper<ExtendedPerson>(ExtendedPerson.class));
    assertEquals(1, result.size());
    ExtendedPerson bean = result.get(0);
    verifyConcretePerson(bean);
    mock.verifyClosed();
}
项目:spring4-understanding    文件:BeanPropertyRowMapperTests.java   
@Test
public void testMappingWithUnpopulatedFieldsNotAccepted() throws Exception {
    Mock mock = new Mock();
    thrown.expect(InvalidDataAccessApiUsageException.class);
    mock.getJdbcTemplate().query(
            "select name, age, birth_date, balance from people",
            new BeanPropertyRowMapper<ExtendedPerson>(ExtendedPerson.class, true));
}
项目:class-guard    文件:BeanPropertyRowMapperTests.java   
@Test
public void testMappingWithUnpopulatedFieldsNotChecked() throws Exception {
    Mock mock = new Mock();
    List<ExtendedPerson> result = mock.getJdbcTemplate().query(
            "select name, age, birth_date, balance from people",
            new BeanPropertyRowMapper<ExtendedPerson>(ExtendedPerson.class));
    assertEquals(1, result.size());
    ExtendedPerson bean = result.get(0);
    verifyConcretePerson(bean);
    mock.verifyClosed();
}
项目:class-guard    文件:BeanPropertyRowMapperTests.java   
@Test
public void testMappingWithUnpopulatedFieldsNotAccepted() throws Exception {
    Mock mock = new Mock();
    thrown.expect(InvalidDataAccessApiUsageException.class);
    mock.getJdbcTemplate().query(
            "select name, age, birth_date, balance from people",
            new BeanPropertyRowMapper<ExtendedPerson>(ExtendedPerson.class, true));
}