Package org.impalaframework.interactive.classloader

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


        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

        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

    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

TOP

Related Classes of org.impalaframework.interactive.classloader.TestClassLoader

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.