Package com.sun.jini.test.spec.jeri.connection.util

Examples of com.sun.jini.test.spec.jeri.connection.util.TestService.doSomething()


            new BasicJeriExporter(tse, new BasicILFactory());
        TestServiceImpl service = new TestServiceImpl();
        TestService stub = (TestService) exporter.export(service);
        TestEndpoint te = tse.getTestEndpoint();
        //make a call
        stub.doSomething();
        //Verify that the 3-arg connect method is called
        if (methodCalls.get(connect2)==null) {
            throw new TestException("The ConnectionManager"
                + " did not call 3-arg connect on the ConnectionEndpoint");
        }
View Full Code Here


                + " Connection");
        }
        //Verify that the single-arg connect is not called if the 3-arg
        //connect is called
        clearMethodCalls();
        stub.doSomething();
        //Verify that the 3-arg connect method is called
        if (methodCalls.get(connect2)==null) {
            throw new TestException("The ConnectionManager"
                + " did not call 3-arg connect on the ConnectionEndpoint");
        }
View Full Code Here

        //Check exceptions
        clearMethodCalls();
        te.setException("connect");
        boolean exceptionThrown = false;
        try {
           stub.doSomething();
        } catch (Exception e) {
            if (e.getMessage().equals("Bogus Exception")) {
                exceptionThrown = true;
            } else {
                e.printStackTrace();
View Full Code Here

        }
        clearMethodCalls();
        te.setException("writeRequestData");
        exceptionThrown = false;
        try {
           stub.doSomething();
        } catch (Exception e) {
            if (e.getMessage().equals("Bogus Exception")) {
                exceptionThrown = true;
            } else {
                e.printStackTrace();
View Full Code Here

        BasicJeriExporter exporter = new BasicJeriExporter(
        new TestServerEndpoint(getListenPort()), new BasicILFactory());
        TestServiceImpl service = new TestServiceImpl();
        TestService stub = (TestService) exporter.export(service);
        //send a request and receive a response
        stub.doSomething();
        //Verify that checkPermissions is called
        if (methodCalls.get(checkPermissions)==null) {
            throw new TestException("The ServerConnectionManager"
                + " did not call checkPermissions on the ServerConnection");
        }
View Full Code Here

        }
        //Throw a SecurityException in checkPermissions
        ListenOperation.throwException(checkPermissions);
        //make a call
        try {
            stub.doSomething();
        } catch (Exception e) {
            //expected exception
        }
        if (methodCalls.get(dispatch)!=null) {
            throw new TestException("RequestDispatcher was"
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.