Package org.jboss.test.classloading.support

Examples of org.jboss.test.classloading.support.SimpleClassLoader.addResource()


  
   public void testResourceCache() throws Exception
   {
      AbstractClassLoadingDomain domain = new AbstractClassLoadingDomain();
      SimpleClassLoader scl = new SimpleClassLoader();
      scl.addResource("xyzzy/Hello", new URL("file:///"));
      domain.addDomainClassLoader(new DelegatingDomainClassLoader(scl));
     
      URL url = domain.loadResource("xyzzy/Hello", null);
      assertNotNull(url);
     
View Full Code Here


  
   public void testResourceCacheFailed() throws Exception
   {
      AbstractClassLoadingDomain domain = new AbstractClassLoadingDomain();
      SimpleClassLoader scl = new SimpleClassLoader();
      scl.addResource("xyzzy/Hello", new URL("file:///"));
      domain.addDomainClassLoader(new DelegatingDomainClassLoader(scl));
     
      URL url = domain.loadResource("xyzzy/rubbish", null);
      assertNull(url);
     
View Full Code Here

  
   public void testClearResourceCache() throws Exception
   {
      AbstractClassLoadingDomain domain = new AbstractClassLoadingDomain();
      SimpleClassLoader scl = new SimpleClassLoader();
      scl.addResource("xyzzy/Hello", new URL("file:///"));
      DelegatingDomainClassLoader ddcl = new DelegatingDomainClassLoader(scl);
      domain.addDomainClassLoader(ddcl);
     
      URL url = domain.loadResource("xyzzy/Hello", null);
      assertNotNull(url);
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.