Package mock.javax.sql

Examples of mock.javax.sql.DataSourceMock


    /**
     * Tests that all the mock objects can be initialised correctly.
     */
    public void testInitialisation() {
        new DataSourceMock("dataSource", expectations);
    }
View Full Code Here


    private ConnectionMock connectionMock;

    protected void setUp() throws Exception {
        super.setUp();

        dataSourceMock = new DataSourceMock("dataSourceMock", expectations);
        connectionMock = new ConnectionMock("connectionMock", expectations);
    }
View Full Code Here

        dict.put(JDBCReportHandler.JNDI_NAME_PROPERTY, "jndi://dsf");
        ContextMock context = new ContextMock(expectations);
        ContextMock envContext = new ContextMock(expectations);
        context.expects.lookup("java:comp/env").returns(envContext).any();
        envContext.expects.lookup("jndi://dsf").returns(
            new DataSourceMock(expectations)).any();

        return new JDBCReportHandler(dict, context);
    }
View Full Code Here

TOP

Related Classes of mock.javax.sql.DataSourceMock

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.