Package com.mockrunner.mock.jdbc

Examples of com.mockrunner.mock.jdbc.MockPreparedStatement


  }

  private void setupBatchStatements() {
    // these queries must be the same as the query in TestMapper.xml
    connection.getPreparedStatementResultSetHandler().addPreparedStatement(
        new MockPreparedStatement(connection, "INSERT ? INTO test"));

    connection.getPreparedStatementResultSetHandler().prepareThrowsSQLException("INSERT fail");

  }
View Full Code Here


        }

        @Override
        public PreparedStatement prepareStatement(final String sql, int arg1,
                int arg2) throws SQLException {
            pstmt = new MockPreparedStatement(this, sql, arg1, arg2) {
               
                @Override
                public ResultSet executeQuery()
                        throws SQLException {
                    // check if the condition ID = ? is present in the query
View Full Code Here

TOP

Related Classes of com.mockrunner.mock.jdbc.MockPreparedStatement

Copyright © 2018 www.massapicom. 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.