Good news, these artefacts are implemented on Github master for jOOQ 3.0: JDBC implementations: - MockConnection: https://github.com/jOOQ/jOOQ/blob/master/jOOQ/src/main/java/org/jooq/tools/jdbc/MockConnection.java - MockStatement: https://github.com/jOOQ/jOOQ/blob/master/jOOQ/src/main/java/org/jooq/tools/jdbc/MockStatement.java - MockResultSet: https://github.com/jOOQ/jOOQ/blob/master/jOOQ/src/main/java/org/jooq/tools/jdbc/MockResultSet.java - MockResultSetMetaData: https://github.com/jOOQ/jOOQ/blob/master/jOOQ/src/main/java/org/jooq/tools/jdbc/MockResultSetMetaData.java
(ResultSet and ResultSetMetaData already existed. They were previously known as org.jooq.impl.ResultSetImpl) Testing interface: - MockDataProvider: https://github.com/jOOQ/jOOQ/blob/master/jOOQ/src/main/java/org/jooq/tools/jdbc/MockDataProvider.java - MockExecuteContext: https://github.com/jOOQ/jOOQ/blob/master/jOOQ/src/main/java/org/jooq/tools/jdbc/MockExecuteContext.java - MockResult: https://github.com/jOOQ/jOOQ/blob/master/jOOQ/src/main/java/org/jooq/tools/jdbc/MockResult.java The interface looks like this: ------------------------------------------------------------ public interface MockDataProvider { MockResult[] execute(MockExecuteContext ctx) throws SQLException; } ------------------------------------------------------------ MockResult wraps Statement#getUpdateCount() and Statement#getResultSet(). The above API allows for mocking: - Statements without results - Statements without results but with generated keys - Statements with results - Statements with several results - Batch statements with single queries and multiple bind value sets - Batch statements with multiple queries and no bind values Usage examples can be seen here: https://github.com/jOOQ/jOOQ/blob/master/jOOQ/src/test/java/org/jooq/test/MockTest.java More documentation will be contained in the manual -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
