Package org.jacorb.test

Examples of org.jacorb.test.Sample.ping()


    @Test
    public void test_ping()
    {
        Sample sample = server.getObject();
        int result = sample.ping (17);
        assertEquals (18, result);
    }

    @Test
    public void test_primary_ok()
View Full Code Here


    @Test
    public void test_primary_ok()
    {
        server.setIORAddress( CORRECT_HOST, CORRECT_PORT );
        Sample s = server.getObject();
        int result = s.ping (77);
        assertEquals (78, result);
    }

    @Test
    public void test_primary_wrong_host()
View Full Code Here

    {
        server.setIORAddress( WRONG_HOST, CORRECT_PORT );
        Sample sample = server.getObject();
        try
        {
            sample.ping (123);
            fail ("TRANSIENT or TIMEOUT exception expected");
        }
        catch (org.omg.CORBA.TRANSIENT ex)
        {
            // ok - unable to resolve the address
View Full Code Here

        server.setIORAddress( CORRECT_HOST, WRONG_PORT );
        Sample sample = server.getObject();

        try
        {
            sample.ping (4);
            fail ("TRANSIENT or TIMEOUT exception expected");
        }
        catch (org.omg.CORBA.TRANSIENT ex)
        {
            // ok - unable to resolve the address
View Full Code Here

    public void test_alternate_ok()
    {
        server.setIORAddress( WRONG_HOST, CORRECT_PORT );
        server.addAlternateAddress( CORRECT_HOST, CORRECT_PORT );
        Sample sample = server.getObject();
        int result = sample.ping (99);
        assertEquals (100, result);
    }

    @Test
    public void test_alternate_ok_2()
View Full Code Here

    {
        server.setIORAddress( WRONG_HOST, CORRECT_PORT );
        server.addAlternateAddress( WRONG_HOST_2, CORRECT_PORT );
        server.addAlternateAddress( CORRECT_HOST, CORRECT_PORT );
        Sample sample = server.getObject();
        int result = sample.ping (187);
        assertEquals (188, result);
    }

    @Test
    public void test_alternate_wrong()
View Full Code Here

        server.addAlternateAddress( WRONG_HOST_2, WRONG_PORT );
        Sample sample = server.getObject();

        try
        {
            sample.ping (33);
            fail ("TRANSIENT or TIMEOUT  exception expected");
        }
        catch (org.omg.CORBA.TRANSIENT ex)
        {
            // ok - unable to resolve the address
View Full Code Here

    @Test
    public void test_ping()
    {
        Sample s = server.getObject();
        int result = s.ping (17);
        assertEquals (18, result);
    }

    @Test
    public void test_primary_ok()
View Full Code Here

    @Test
    public void test_primary_ok()
    {
        server.setIORProtAddr (PROTOCOL + CORRECT_HOST + ":" + CORRECT_PORT);
        Sample s = server.getObject();
        int result = s.ping (77);
        assertEquals (78, result);
    }

    @Test
    public void test_primary_wrong_host()
View Full Code Here

    {
        server.setIORProtAddr (PROTOCOL + WRONG_HOST + ":" + CORRECT_PORT);
        Sample s = server.getObject();
        try
        {
            s.ping (123);
            fail ("TRANSIENT or TIMEOUT  exception expected");
        }
        catch (org.omg.CORBA.TRANSIENT ex)
        {
            // ok - unable to resolve the address
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.