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

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


   }

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


   }

   public void testRegisterClassLoaderPolicyTwiceDifferentDomains()
   {
      MockClassLoaderSystem system = createMockClassLoaderSystem();
      MockClassLoaderDomain domain1 = new MockClassLoaderDomain("domain1");
      MockClassLoaderDomain domain2 = new MockClassLoaderDomain("domain2");
      MockClassLoaderPolicy policy = createMockClassLoaderPolicy();
      system.registerDomain(domain1);
      system.registerDomain(domain2);
      system.registerClassLoaderPolicy(domain1, policy);
      try
View Full Code Here

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

   }
  
   public void testUnregisterClassLoaderExplicitDomain() 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 testUnregisterClassLoaderPolicyExplicitDomain() throws Exception
   {
      MockClassLoaderSystem system = createMockClassLoaderSystem();
      MockClassLoaderPolicy policy = createMockClassLoaderPolicy();
      MockClassLoaderDomain domain = system.createAndRegisterDomain("mock");
      ClassLoader cl1 = MockClassLoaderHelper.registerMockClassLoader(system, domain, policy);
     
      List<ClassLoader> expected = new ArrayList<ClassLoader>();
      expected.add(cl1);
     
View Full Code Here

  
   public void testClassLoaderPolicyShutdownFromClassLoaderSystemShutdown() throws Exception
   {
      MockClassLoaderSystem system = createMockClassLoaderSystem();
      SimpleMockClassLoaderPolicy policy = new SimpleMockClassLoaderPolicy();
      MockClassLoaderDomain domain = system.createAndRegisterDomain("mock");
      system.registerClassLoaderPolicy(domain, policy);

      assertFalse(policy.shutdown);
      system.shutdown();
      assertTrue("Policy should be shutdown", policy.shutdown);
View Full Code Here

  
   public void testClassLoaderPolicyShutdownFromClassLoaderDomainUnregister() throws Exception
   {
      MockClassLoaderSystem system = createMockClassLoaderSystem();
      SimpleMockClassLoaderPolicy policy = new SimpleMockClassLoaderPolicy();
      MockClassLoaderDomain domain = system.createAndRegisterDomain("mock");
      system.registerClassLoaderPolicy(domain, policy);

      assertFalse(policy.shutdown);
      system.unregisterDomain(domain);
      assertTrue("Policy should be shutdown", policy.shutdown);
View Full Code Here

  
   public void testClassLoaderPolicyShutdownFromClassLoaderPolicyUnregister() throws Exception
   {
      MockClassLoaderSystem system = createMockClassLoaderSystem();
      SimpleMockClassLoaderPolicy policy = new SimpleMockClassLoaderPolicy();
      MockClassLoaderDomain domain = system.createAndRegisterDomain("mock");
      system.registerClassLoaderPolicy(domain, policy);

      assertFalse(policy.shutdown);
      system.unregisterClassLoaderPolicy(policy);
      assertTrue("Policy should be shutdown", policy.shutdown);
View Full Code Here

  
   public void testClassLoaderPolicyShutdownFromClassLoaderUnregister() throws Exception
   {
      MockClassLoaderSystem system = createMockClassLoaderSystem();
      SimpleMockClassLoaderPolicy policy = new SimpleMockClassLoaderPolicy();
      MockClassLoaderDomain domain = system.createAndRegisterDomain("mock");
      ClassLoader cl = system.registerClassLoaderPolicy(domain, policy);

      assertFalse(policy.shutdown);
      system.unregisterClassLoader(cl);
      assertTrue("Policy should be shutdown", policy.shutdown);
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.