Package com.sun.jini.test.spec.security.proxytrust.util

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


        Object[] args = new Object[] {
            proxy,
            ProxyTrustUtil.newProxyInstance(new Interface1Impl(), ptih, cl),
            ProxyTrustUtil.newProxyInstance(new Interface1Impl()),
            ProxyTrustUtil.newProxyInstance(new Interface2Impl(), ptih),
            ProxyTrustUtil.newProxyInstance(new Interface12Impl(), ptih)};
        boolean[] expRes = new boolean[] { true, true, false, false, false };
        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 Interface12Impl(), ptih);
        args = new Object[] {
            proxy,
            ProxyTrustUtil.newProxyInstance(new Interface12Impl(), ptih, cl),
            ProxyTrustUtil.newProxyInstance(new Interface12Impl()),
            ProxyTrustUtil.newProxyInstance(new Interface13Impl(), ptih),
            ProxyTrustUtil.newProxyInstance(new Interface21Impl(), ptih) };
        expRes = new boolean[] { true, true, false, false, false };

        for (int i = 0; i < args.length; ++i) {
View Full Code Here


    public void run() throws Exception {
        RemoteMethodControl main = createValidMainProxy();
        ProxyTrust boot = createValidBootProxy();
        ProxyTrustInvocationHandler ptih = createPTIH(main, boot);
        Object proxy = ProxyTrustUtil.newProxyInstance(
                new Interface12Impl(), ptih);
        Method m = Object.class.getDeclaredMethod("hashCode", new Class[0]);
        TestClassLoader cl = new TestClassLoader();
        Object proxy1 = ProxyTrustUtil.newProxyInstance(
                new Interface12Impl(), ptih, cl);
        Object res = ptihInvoke(ptih, proxy, m, null);
        Object res1 = ptihInvoke(ptih, proxy, m, null);

        if (res != null && res1 != null && !res.equals(res1)) {
            // FAIL
View Full Code Here

TOP

Related Classes of com.sun.jini.test.spec.security.proxytrust.util.Interface12Impl

Copyright © 2018 www.massapicom. 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.