Package net.sf.jdistunit.platform.agent

Examples of net.sf.jdistunit.platform.agent.TestBox


    public void testTestBox() throws Exception {
        // Create simulated network of test servers.
        HostEnvironment env = new HostEnvironment(true);

        // Create new test box.
        ITestBox box = new TestBox(15907);

        // Connect box with other hosts.
        final HostId routerId = env.host1.getHomeId();
        box.connectToNetwork(routerId);

        // Test server count.
        final int testServerCount = box.getTestServerCount();
        assertEquals(2, testServerCount);

        // Shut down box and environment.
        env.shutDown();
        box.shutdown();

        // Wait for ports to be freed.
        OS.sleep(500);
    }
View Full Code Here


     * @see junit.framework.TestCase#setUp()
     */
    @Override
    protected void setUp() throws Exception {
        // Create a new test box and connect to all servers.
        testBox = new TestBox(new HostId("ginko.vpn:15900"));
        for (String serverId : servers) {
            final HostId hostId = new HostId(serverId);
            testBox.connectToNetwork(hostId);
        }

View Full Code Here

    /**
     * @see junit.framework.TestCase#setUp()
     */
    @Override
    protected void setUp() throws Exception {
        testBox = new TestBox(new HostId("ginko.vpn:15900"));
        testBox.connectToNetwork(new HostId("ginko.vpn:15907"));
        testBox.connectToNetwork(new HostId("eva.vpn:15907"));
    }
View Full Code Here

TOP

Related Classes of net.sf.jdistunit.platform.agent.TestBox

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.