Examples of FakeAbstractILFactory


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

            logger.log(Level.FINE,"=================================");
            logger.log(Level.FINE,"test case " + (counter++) + ": "
                + "equals is false with AbstractILFactory impl");
            logger.log(Level.FINE,"");

            FakeAbstractILFactory fa = new FakeAbstractILFactory();
            assertion(! factory1.equals(fa));

            logger.log(Level.FINE,"=================================");
            logger.log(Level.FINE,"test case " + (counter++) + ": "
                + "equals is false with InvocationLayerFactory impl");
View Full Code Here

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

    public void setup(QAConfig sysConfig) throws Exception {
    }

    public void run() throws Exception {
        FakeAbstractILFactory fakeILFactory = new FakeAbstractILFactory();
        FakeRemoteSubImpl fakeRemoteSubImpl = new FakeRemoteSubImpl();
        FakeIllegalRemoteImpl fakeIllegalRemoteImpl =
            new FakeIllegalRemoteImpl();

        logger.log(Level.FINE,"=================================");
        logger.log(Level.FINE,"test case 1: getExtraProxyInterfaces");
        logger.log(Level.FINE,"");

        try {
            fakeILFactory.getExtraProxyInterfaces(null);
            assertion(false);
        } catch (NullPointerException ignore) {
        }

        Class[] interfaces =
            fakeILFactory.getExtraProxyInterfaces(fakeRemoteSubImpl);
        assertion(interfaces.length == 1,
            "number of interfaces: " + interfaces.length);
        assertion(interfaces[0] == RemoteMethodControl.class,
            "interface[0] is: " + interfaces[0]);

        logger.log(Level.FINE,"=================================");
        logger.log(Level.FINE,"test case 2: getProxyInterfaces");
        logger.log(Level.FINE,"");

        try {
            fakeILFactory.getProxyInterfaces(null);
            assertion(false);
        } catch (NullPointerException ignore) {
        }

        interfaces = fakeILFactory.getProxyInterfaces(fakeRemoteSubImpl);
        assertion(interfaces.length == 3,
            "number of interfaces: " + interfaces.length);
        assertion(interfaces[0] == FakeRemoteInterface.class,
            "interface[0] is: " + interfaces[0]);
        assertion(interfaces[1] == FakeRemoteSubInterface.class,
            "interface[1] is: " + interfaces[1]);
        assertion(interfaces[2] == RemoteMethodControl.class,
            "interface[2] is: " + interfaces[2]);

        logger.log(Level.FINE,"=================================");
        logger.log(Level.FINE,"test case 3: getRemoteInterfaces");
        logger.log(Level.FINE,"");

        try {
            fakeILFactory.getRemoteInterfaces(null);
            assertion(false);
        } catch (NullPointerException ignore) {
        }

        try {
            fakeILFactory.getRemoteInterfaces(fakeIllegalRemoteImpl);
            assertion(false);
        } catch (ExportException ignore) {
        }

        interfaces = fakeILFactory.getRemoteInterfaces(fakeRemoteSubImpl);
        assertion(interfaces.length == 2,
            "number of interfaces: " + interfaces.length);
        assertion(interfaces[0] == FakeRemoteInterface.class,
            "interface[0] is: " + interfaces[0]);
        assertion(interfaces[1] == FakeRemoteSubInterface.class,
            "interface[1] is: " + interfaces[1]);

        logger.log(Level.FINE,"=================================");
        logger.log(Level.FINE,"test case 4: "
            + "getInvocationDispatcherMethods");
        logger.log(Level.FINE,"");

        try {
            fakeILFactory.getInvocationDispatcherMethods(null);
            assertion(false);
        } catch (NullPointerException ignore) {
        }

        try {
            fakeILFactory.getInvocationDispatcherMethods(
                fakeIllegalRemoteImpl);
            assertion(false);
        } catch (ExportException ignore) {
        }

        Collection methods =
            fakeILFactory.getInvocationDispatcherMethods(fakeRemoteSubImpl);
        assertion(methods instanceof Set);
        assertion(methods.size() == 2,
            "number of methods: " + methods.size());
        Method m = FakeRemoteInterface.class.getMethod("fakeMethod1",null);
        assertion(methods.contains(m),"method is: " + m);
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.