Examples of DatabaseResults


Examples of com.j256.ormlite.support.DatabaseResults

  @Test(expected = IllegalStateException.class)
  public void testNextThrow() throws Exception {
    ConnectionSource cs = createMock(ConnectionSource.class);
    cs.releaseConnection(null);
    CompiledStatement stmt = createMock(CompiledStatement.class);
    DatabaseResults results = createMock(DatabaseResults.class);
    expect(stmt.runQuery(null)).andReturn(results);
    expect(results.first()).andReturn(true);
    @SuppressWarnings("unchecked")
    GenericRowMapper<Foo> mapper = (GenericRowMapper<Foo>) createMock(GenericRowMapper.class);
    expect(mapper.mapRow(results)).andThrow(new SQLException("some result problem"));
    stmt.close();
    replay(stmt, mapper, cs, results);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.