Package mock.javax.naming

Examples of mock.javax.naming.ContextMock


    public ReportEventHandler createReportEventHandler()
        throws ConfigurationException {
        Dictionary dict = new Hashtable();
        dict.put(JDBCReportHandler.TABLE_NAME_PROPERTY, "TableName");
        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.naming.ContextMock

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.