Package org.jacorb.orb.factory

Examples of org.jacorb.orb.factory.PortRangeSocketFactory


    private static final int MIN = 40000;
    private static final int MAX = 40010;

    protected SocketFactory newObjectUnderTest() throws ConfigurationException
    {
        final PortRangeSocketFactory factory = new PortRangeSocketFactory();

        MockControl configControl = MockControl.createControl(Configuration.class);
        Configuration configMock = (Configuration) configControl.getMock();

        configControl.expectAndReturn(configMock.getLogger("jacorb.orb.socketfactory"), new NullLogger());
        configControl.expectAndReturn(configMock.getAttributeAsInteger(PortRangeSocketFactory.MIN_PROP), MIN);
        configControl.expectAndReturn(configMock.getAttributeAsInteger(PortRangeSocketFactory.MAX_PROP), MAX);
        configControl.replay();

        factory.configure(configMock);

        return factory;
    }
View Full Code Here


    private static final int MAX = 40010;

    @Override
    protected SocketFactory newObjectUnderTest() throws ConfigurationException
    {
        final PortRangeSocketFactory factory = new PortRangeSocketFactory();

        MockControl configControl = MockControl.createControl(Configuration.class);
        Configuration configMock = (Configuration) configControl.getMock();

        configControl.expectAndReturn(configMock.getLogger("org.jacorb.orb.socketfactory"), TestUtils.getLogger());
        configControl.expectAndReturn(configMock.getAttributeAsInteger(PortRangeSocketFactory.MIN_PROP), MIN);
        configControl.expectAndReturn(configMock.getAttributeAsInteger(PortRangeSocketFactory.MAX_PROP), MAX);
        configControl.expectAndReturn(configMock.getAttribute("OAIAddr", ""), "");
        configControl.replay();

        factory.configure(configMock);

        return factory;
    }
View Full Code Here

TOP

Related Classes of org.jacorb.orb.factory.PortRangeSocketFactory

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.