Package org.jboss.test.classloader.system.support

Examples of org.jboss.test.classloader.system.support.MockClassLoaderDomain


   }
  
   public void testRegisterClassLoaderExplicitDomain() throws Exception
   {
      MockClassLoaderSystem system = createMockClassLoaderSystem();
      MockClassLoaderDomain domain = system.createAndRegisterDomain("mock");
      ClassLoader cl1 = createAndRegisterMockClassLoader(system, domain);
     
      List<ClassLoader> expected = new ArrayList<ClassLoader>();
      expected.add(cl1);
     
View Full Code Here


  
   public void testRegisterClassLoaderConstructDomain() throws Exception
   {
      MockClassLoaderSystem system = createMockClassLoaderSystem();
      ClassLoader cl1 = createAndRegisterMockClassLoader(system, "test", "mock");
      MockClassLoaderDomain domain = (MockClassLoaderDomain) system.getDomain("test");
      assertEquals(ParentPolicy.BEFORE, domain.getParentPolicy());
      assertFalse(domain.getParent() instanceof ClassLoaderDomain);
     
      List<ClassLoader> expected = new ArrayList<ClassLoader>();
      expected.add(cl1);
     
      assertEquals(expected, domain.added);
View Full Code Here

  
   public void testRegisterClassLoaderConstructDomainWithoutParentDomain() throws Exception
   {
      MockClassLoaderSystem system = createMockClassLoaderSystem();
      ClassLoader cl1 = createAndRegisterMockClassLoader(system, "test", ParentPolicy.AFTER, "mock");
      MockClassLoaderDomain domain = (MockClassLoaderDomain) system.getDomain("test");
      assertEquals(ParentPolicy.AFTER, domain.getParentPolicy());
      assertFalse(domain.getParent() instanceof ClassLoaderDomain);
     
      List<ClassLoader> expected = new ArrayList<ClassLoader>();
      expected.add(cl1);
     
      assertEquals(expected, domain.added);
View Full Code Here

  
   public void testRegisterClassLoaderConstructDomainWithParentDomain() throws Exception
   {
      MockClassLoaderSystem system = createMockClassLoaderSystem();
      ClassLoader cl1 = createAndRegisterMockClassLoader(system, "test", ParentPolicy.AFTER, ClassLoaderSystem.DEFAULT_DOMAIN_NAME, "mock");
      MockClassLoaderDomain domain = (MockClassLoaderDomain) system.getDomain("test");
      MockClassLoaderDomain parent = (MockClassLoaderDomain) system.getDomain(ClassLoaderSystem.DEFAULT_DOMAIN_NAME);
      assertEquals(ParentPolicy.AFTER, domain.getParentPolicy());
      assertEquals(parent, domain.getParent());
     
      List<ClassLoader> expected = new ArrayList<ClassLoader>();
      expected.add(cl1);
View Full Code Here

   }
  
   public void testRegisterClassLoaderConstructDomainWithParentDomainAlreadyExists() throws Exception
   {
      MockClassLoaderSystem system = createMockClassLoaderSystem();
      MockClassLoaderDomain domain = new MockClassLoaderDomain("test");
      system.registerDomain(domain);
      ClassLoader cl1 = createAndRegisterMockClassLoader(system, "test", ParentPolicy.AFTER, ClassLoaderSystem.DEFAULT_DOMAIN_NAME, "mock");
     
      List<ClassLoader> expected = new ArrayList<ClassLoader>();
      expected.add(cl1);
View Full Code Here

   }
  
   public void testRegisterClassLoaderConstructDomainWithParentPolicyAlreadyExists() throws Exception
   {
      MockClassLoaderSystem system = createMockClassLoaderSystem();
      MockClassLoaderDomain domain = new MockClassLoaderDomain("test");
      system.registerDomain(domain);
      ClassLoader cl1 = createAndRegisterMockClassLoader(system, "test", ParentPolicy.AFTER, "mock");
     
      List<ClassLoader> expected = new ArrayList<ClassLoader>();
      expected.add(cl1);
View Full Code Here

   }
  
   public void testRegisterClassLoaderConstructDomainAlreadyExists() throws Exception
   {
      MockClassLoaderSystem system = createMockClassLoaderSystem();
      MockClassLoaderDomain domain = new MockClassLoaderDomain("test");
      system.registerDomain(domain);
      ClassLoader cl1 = createAndRegisterMockClassLoader(system, "test", "mock");
     
      List<ClassLoader> expected = new ArrayList<ClassLoader>();
      expected.add(cl1);
View Full Code Here

   }

   public void testRegisterNullClassLoaderPolicyExplicitDomain()
   {
      MockClassLoaderSystem system = createMockClassLoaderSystem();
      MockClassLoaderDomain domain = new MockClassLoaderDomain();
      system.registerDomain(domain);
      try
      {
         system.registerClassLoaderPolicy(domain, null);
         fail("Should not be here!");
View Full Code Here

   }

   public void testRegisterClassLoaderPolicyWithNotRegisteredDomain()
   {
      MockClassLoaderSystem system = createMockClassLoaderSystem();
      MockClassLoaderDomain domain = new MockClassLoaderDomain();
      MockClassLoaderPolicy policy = createMockClassLoaderPolicy();
      try
      {
         system.registerClassLoaderPolicy(domain, policy);
         fail("Should not be here!");
View Full Code Here

   }

   public void testRegisterClassLoaderPolicyWithUnregisteredDomain()
   {
      MockClassLoaderSystem system = createMockClassLoaderSystem();
      MockClassLoaderDomain domain = new MockClassLoaderDomain();
      MockClassLoaderPolicy policy = createMockClassLoaderPolicy();
      system.registerDomain(domain);
      system.unregisterDomain(domain);
      try
      {
View Full Code Here

TOP

Related Classes of org.jboss.test.classloader.system.support.MockClassLoaderDomain

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.