[Squirrel-sql-commits] sql12/test/src/net/sourceforge/squirrel_sql/test TestUtil.java, 1.2, 1.3
A Java SQL client for any JDBC compliant database
Brought to you by:
colbell,
gerdwagner
From: Rob M. <man...@us...> - 2007-05-12 14:17:00
|
Update of /cvsroot/squirrel-sql/sql12/test/src/net/sourceforge/squirrel_sql/test In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv27042/test/src/net/sourceforge/squirrel_sql/test Modified Files: TestUtil.java Log Message: Added new column tests. Fixed Progress so that CLOBs and LONGVARCHARS not limited to 31,982 (This may or may not be valid - so no MappingException, but possibly a SQLException. Need to find Progress documentation on data types). Index: TestUtil.java =================================================================== RCS file: /cvsroot/squirrel-sql/sql12/test/src/net/sourceforge/squirrel_sql/test/TestUtil.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestUtil.java 11 May 2007 22:34:53 -0000 1.2 --- TestUtil.java 12 May 2007 14:16:55 -0000 1.3 *************** *** 5,8 **** --- 5,9 ---- import static org.easymock.EasyMock.expect; import static org.easymock.EasyMock.replay; + import static org.easymock.EasyMock.startsWith; import java.sql.Connection; *************** *** 54,64 **** } - - public static ISQLConnection getEasyMockSQLConnection(ResultSet rs) throws SQLException { Statement stmt = createNiceMock(Statement.class); ! expect(stmt.executeQuery("")).andReturn(rs); replay(stmt); --- 55,66 ---- } public static ISQLConnection getEasyMockSQLConnection(ResultSet rs) throws SQLException { + if (rs == null) { + throw new IllegalArgumentException("rs cannot be null"); + } Statement stmt = createNiceMock(Statement.class); ! expect(stmt.executeQuery(startsWith("select"))).andReturn(rs).anyTimes(); replay(stmt); |