Examples of TEImpl


Examples of com.sun.jini.test.spec.security.proxytrust.util.TEImpl

        TestClassLoader cl = new TestClassLoader();
        Object[] args = new Object[] {
            ProxyTrustUtil.newProxyInstance(new Interface1Impl(), ptih),
            ProxyTrustUtil.newProxyInstance(new Interface2TEImpl(), ptih),
            ProxyTrustUtil.newProxyInstance(new Interface12TEImpl(), ptih),
            ProxyTrustUtil.newProxyInstance(new TEImpl(), ptih),
            ProxyTrustUtil.newProxyInstance(new Interface1TEImpl()),
            ProxyTrustUtil.newProxyInstance(new Interface1TEImpl(), ptih, cl),
            proxy };
        boolean[] expRes = new boolean[] {
            false, false, false, false, false, true, true };
        Object res;

        for (int i = 0; i < args.length; ++i) {
            res = ptihInvoke(ptih, proxy, m, new Object[] { args[i] });

            if (!isOk(res, expRes[i])) {
                // FAIL
                throw new TestException(
                        "'invoke' method of constructed "
                        + "ProxyTrustInvocationHandler returned " + res
                        + ", while Boolean(" + expRes[i]
                        + ") was expected.");
            }
        }
        proxy = ProxyTrustUtil.newProxyInstance(new TEImpl(), ptih);
        args = new Object[] {
            ProxyTrustUtil.newProxyInstance(new Interface1TEImpl(), ptih),
            ProxyTrustUtil.newProxyInstance(new TEImpl()),
            ProxyTrustUtil.newProxyInstance(new TEImpl(), ptih, cl),
            proxy };
        expRes = new boolean[] { false, false, true, true };

        for (int i = 0; i < args.length; ++i) {
            res = ptihInvoke(ptih, proxy, m, new Object[] { args[i] });
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.