Examples of TestClassLoader


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

        ProxyTrustInvocationHandler ptih = createPTIH(main, boot);
        Object proxy = ProxyTrustUtil.newProxyInstance(
                new Interface1Impl(), ptih);
        Method m = Object.class.getDeclaredMethod("equals",
                new Class[] { Object.class });
        TestClassLoader cl = new TestClassLoader();
        Object[] args = new Object[] {
            proxy,
            ProxyTrustUtil.newProxyInstance(new Interface1Impl(), ptih, cl),
            ProxyTrustUtil.newProxyInstance(new Interface1Impl()),
            ProxyTrustUtil.newProxyInstance(new Interface2Impl(), ptih),
View Full Code Here

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

        ProxyTrustInvocationHandler ptih = createPTIH(main, boot);
        Object proxy = ProxyTrustUtil.newProxyInstance(
                new Interface1TEImpl(), ptih);
        Method m = TrustEquivalence.class.getDeclaredMethod(
                "checkTrustEquivalence", new Class[] { Object.class });
        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),
View Full Code Here

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

        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);
View Full Code Here

Examples of org.impalaframework.classloader.TestClassLoader

    String currentDirectoryName = getCurrentDirectoryName(true);

    List<Resource> locationResources = moduleLocationResolver.getModuleTestClassLocations(currentDirectoryName);
    File[] locations = ResourceUtils.getFiles(locationResources);

    return new TestClassLoader(parentClassLoader, locations, name);
  }
View Full Code Here

Examples of org.impalaframework.interactive.classloader.TestClassLoader

import junit.framework.TestCase;

public class TestClassLoaderTest extends TestCase {

    public void testLoadClassString() throws Exception {
        TestClassLoader tcl = new TestClassLoader(new File[] {new File("../impala-interactive/testbin")}, "org.impalaframework.interactive.testrun.AJUnitTest");

        // check that this class loader loads the named class
        Class<?> cls = Class.forName("org.impalaframework.interactive.testrun.AJUnitTest", false, tcl);
        assertSame(cls.getClassLoader(), tcl);

        Map<String, Class<?>> loadedClasses = tcl.getLoadedClasses();
        assertEquals(1, loadedClasses.size());
        assertNotNull(loadedClasses.get("org.impalaframework.interactive.testrun.AJUnitTest"));

        // but not a String
        cls = Class.forName("java.lang.String", false, tcl);
View Full Code Here

Examples of org.impalaframework.interactive.classloader.TestClassLoader

        String currentDirectoryName = getCurrentDirectoryName(true);

        List<Resource> locationResources = moduleLocationResolver.getModuleTestClassLocations(currentDirectoryName);
        File[] locations = ResourceUtils.getFiles(locationResources);

        return new TestClassLoader(parentClassLoader, locations, name);
    }
View Full Code Here

Examples of org.impalaframework.interactive.classloader.TestClassLoader

        String currentDirectoryName = getCurrentDirectoryName(true);

        List<Resource> locationResources = moduleLocationResolver.getModuleTestClassLocations(currentDirectoryName);
        File[] locations = ResourceUtils.getFiles(locationResources);

        return new TestClassLoader(parentClassLoader, locations, name);
    }
View Full Code Here

Examples of org.impalaframework.interactive.classloader.TestClassLoader

    String currentDirectoryName = getCurrentDirectoryName(true);

    List<Resource> locationResources = moduleLocationResolver.getModuleTestClassLocations(currentDirectoryName);
    File[] locations = ResourceUtils.getFiles(locationResources);

    return new TestClassLoader(parentClassLoader, locations, name);
  }
View Full Code Here

Examples of org.jboss.arquillian.protocol.jmx.JMXTestRunner.TestClassLoader

   private  JMXTestRunner testRunner;
  
   public void start(final BundleContext context) throws Exception
   {
      TestClassLoader loader = new TestClassLoader()
      {
         public Class<?> loadTestClass(String className) throws ClassNotFoundException
         {
            Bundle bundle = context.getBundle();
            return bundle.loadClass(className);
View Full Code Here

Examples of org.jboss.arquillian.protocol.jmx.JMXTestRunner.TestClassLoader

    private JMXTestRunner testRunner;

    public void start(final BundleContext context) throws Exception {

        final TestClassLoader testClassLoader = new TestClassLoader() {

            @Override
            public Class<?> loadTestClass(String className) throws ClassNotFoundException {
                Bundle arqBundle = context.getBundle();
                return arqBundle.loadClass(className);
            }
        };

        // Register the JMXTestRunner
        MBeanServer mbeanServer = getMBeanServer(context);
        testRunner = new JMXTestRunner(testClassLoader) {

            @Override
            public TestResult runTestMethodRemote(String className, String methodName) {
                Bundle bundle = null;
                try {
                    Class<?> testClass = testClassLoader.loadTestClass(className);
                    BundleReference bundleRef = (BundleReference) testClass.getClassLoader();
                    bundle = bundleRef.getBundle();
                } catch (ClassNotFoundException e) {
                    // ignore
                }
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.