Examples of FakeEndpoint


Examples of com.sun.jini.test.spec.jeri.util.FakeEndpoint

    public void setup(QAConfig sysConfig) throws Exception {
    }

    // inherit javadoc
    public void run() throws Exception {
        FakeEndpoint ep1 = new FakeEndpoint(new FakeOutboundRequestIterator(
            new FakeOutboundRequest(),false));
        FakeEndpoint ep2 = new FakeEndpoint(new FakeOutboundRequestIterator(
            new FakeOutboundRequest(),false));
        Uuid uuid1 = UuidFactory.create(1,2);
        Uuid uuid2 = UuidFactory.create(2,1);

        logger.log(Level.FINE,"=================================");
View Full Code Here

Examples of com.sun.jini.test.spec.jeri.util.FakeEndpoint

        OutboundRequest request;

        FakeOutboundRequest fakeRequest = new FakeOutboundRequest();
        FakeOutboundRequestIterator iterator =
            new FakeOutboundRequestIterator(fakeRequest);
        FakeEndpoint ep = new FakeEndpoint(iterator);
        Uuid uuid = UuidFactory.create(1,2);
        BasicObjectEndpoint boe = new BasicObjectEndpoint(ep,uuid,false);

        logger.log(Level.FINE,"=================================");
        logger.log(Level.FINE,"test case " + (counter++)
View Full Code Here

Examples of com.sun.jini.test.spec.jeri.util.FakeEndpoint

    // inherit javadoc
    public void run() throws Exception {
        int counter = 1;
        Uuid uuid;
        FakeEndpoint endpoint;
        FakeOutboundRequestIterator fakeIterator;
        OutboundRequestIterator iterator;
        BasicObjectEndpoint boe;
        FakeOutputStream fos;
        FakeOutboundRequest request;

        logger.log(Level.FINE,"=================================");
        logger.log(Level.FINE,"test case " + (counter++)
            + ": newCall with null InvocationConstraints");
        logger.log(Level.FINE,"");

        uuid = UuidFactory.create(1,2);
        endpoint = new FakeEndpoint(new FakeOutboundRequestIterator(null));
        boe = new BasicObjectEndpoint(endpoint,uuid,false);
        try {
            boe.newCall(null);
            throw new AssertionError("newCall(null) should fail");
        } catch (NullPointerException ignore) {}

        for (int i = 0; i < cases.length; i++) {
            logger.log(Level.FINE,"=================================");
            Throwable nextException = cases[i];
            logger.log(Level.FINE,"test case " + (counter++)
                + ": nextException:" + nextException);
            logger.log(Level.FINE,"");

            // Test Case: OutboundRequestIterator.next throws exception

            uuid = UuidFactory.create(1,2);
            fakeIterator = new FakeOutboundRequestIterator(null);
            fakeIterator.setNextException(nextException);
            endpoint = new FakeEndpoint(fakeIterator);
            boe = new BasicObjectEndpoint(endpoint,uuid,false);

            iterator = boe.newCall(InvocationConstraints.EMPTY);
            try {
                iterator.next();
                throw new AssertionError("next() should fail");
            } catch (Throwable caught) {
                assertion(nextException.equals(caught),
                    caught.toString());
            }

            // Test Case: Uuid.write throws exception

            fos = new FakeOutputStream(nextException);
            request = new FakeOutboundRequest();
            request.setRequestOutputStream(fos);
            fakeIterator = new FakeOutboundRequestIterator(request);
            endpoint = new FakeEndpoint(fakeIterator);
            boe = new BasicObjectEndpoint(endpoint,uuid,false);

            iterator = boe.newCall(InvocationConstraints.EMPTY);
            try {
                iterator.next();
View Full Code Here

Examples of com.sun.jini.test.spec.jeri.util.FakeEndpoint

    public void run() throws Exception {
        int counter = 1;
        Uuid uuid = UuidFactory.create(1,2);
        FakeOutboundRequest request = new FakeOutboundRequest();
        BasicObjectEndpoint boe = new BasicObjectEndpoint(
             new FakeEndpoint(new FakeOutboundRequestIterator(request)),
             uuid,false);
        OutboundRequestIterator iterator =
            boe.newCall(InvocationConstraints.EMPTY);

        logger.log(Level.FINE,"=================================");
View Full Code Here

Examples of com.sun.jini.test.spec.jeri.util.FakeEndpoint

        OutboundRequest request;

        FakeOutboundRequest fakeRequest = new FakeOutboundRequest();
        FakeOutboundRequestIterator iterator =
            new FakeOutboundRequestIterator(fakeRequest);
        FakeEndpoint ep = new FakeEndpoint(iterator);
        Uuid uuid = UuidFactory.create(1,2);
        BasicObjectEndpoint boe = new BasicObjectEndpoint(ep,uuid,false);

        logger.log(Level.FINE,"=================================");
        logger.log(Level.FINE,"test case " + (counter++)
View Full Code Here

Examples of com.sun.jini.test.spec.jeri.util.FakeEndpoint

    }

    // inherit javadoc
    public void run() throws Exception {
        BasicObjectEndpoint boe;
        Endpoint ep = new FakeEndpoint(new FakeOutboundRequestIterator(
            new FakeOutboundRequest(),false));
        Uuid uuid = UuidFactory.create(1,2);

        logger.log(Level.FINE,"=================================");
        logger.log(Level.FINE,"test case 1: "
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.