Package org.jboss.classloading.spi.dependency.policy.mock

Examples of org.jboss.classloading.spi.dependency.policy.mock.MockClassLoaderPolicyModule


      MockClassLoadingMetaData a = new MockClassLoadingMetaData("a");
      a.setPathsAndPackageNames(A.class, B.class);
      KernelControllerContext contextA = install(a);
      try
      {
         MockClassLoaderPolicyModule module = assertModule(contextA);
         ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();
         List<Capability> capabilities = new ArrayList<Capability>();
         capabilities.add(factory.createModule("a"));
         capabilities.add(factory.createPackage(A.class.getPackage().getName()));
         capabilities.add(factory.createPackage(B.class.getPackage().getName()));
         assertEquals(capabilities, module.getCapabilities());
      }
      finally
      {
         uninstall(contextA);
      }
View Full Code Here


         MockClassLoadingMetaData b = new MockClassLoadingMetaData("b");
         b.setPathsAndPackageNames(B.class);
         KernelControllerContext contextB = install(b);
         try
         {
            MockClassLoaderPolicyModule module = assertModule(contextA);
            assertEquals(requirements, module.getRequirements());
         }
         finally
         {
            uninstall(contextB);
         }
View Full Code Here

   protected void testMockClassLoadingMetaData(MockClassLoadingMetaData a, ResourcesAdapter visitor, ResourceFilter filter, ResourceFilter recurseFilter, Set<String> expectedResources) throws Exception
   {
      KernelControllerContext contextA = install(a);
      try
      {
         MockClassLoaderPolicyModule module = assertModule(contextA);
         module.registerClassLoaderPolicy(system);

         if (recurseFilter != null)
         {
            if (filter != null)
               module.visit(visitor, filter, recurseFilter);
            else
               module.visit(visitor, visitor.getFilter(), recurseFilter);
         }
         else if (filter != null)
         {
            module.visit(visitor, filter);
         }
         else
         {
            module.visit(visitor);
         }

         assertEquals(expectedResources, visitor.getResources());
      }
      finally
View Full Code Here

      MockClassLoadingMetaData a = new MockClassLoadingMetaData("a");
      a.setExportAll(ExportAll.ALL);
      KernelControllerContext contextA = install(a);
      try
      {
         MockClassLoaderPolicyModule module = assertModule(contextA);
         assertEquals(ExportAll.ALL, module.getExportAll());
      }
      finally
      {
         uninstall(contextA);
      }
View Full Code Here

      MockClassLoadingMetaData a = new MockClassLoadingMetaData("a");
      a.setIncluded(ClassFilter.JAVA_ONLY);
      KernelControllerContext contextA = install(a);
      try
      {
         MockClassLoaderPolicyModule module = assertModule(contextA);
         assertEquals(ClassFilter.JAVA_ONLY, module.getIncluded());
      }
      finally
      {
         uninstall(contextA);
      }
View Full Code Here

      MockClassLoadingMetaData a = new MockClassLoadingMetaData("a");
      a.setExcluded(ClassFilter.JAVA_ONLY);
      KernelControllerContext contextA = install(a);
      try
      {
         MockClassLoaderPolicyModule module = assertModule(contextA);
         assertEquals(ClassFilter.JAVA_ONLY, module.getExcluded());
      }
      finally
      {
         uninstall(contextA);
      }
View Full Code Here

      MockClassLoadingMetaData a = new MockClassLoadingMetaData("a");
      a.setExcludedExport(ClassFilter.JAVA_ONLY);
      KernelControllerContext contextA = install(a);
      try
      {
         MockClassLoaderPolicyModule module = assertModule(contextA);
         assertEquals(ClassFilter.JAVA_ONLY, module.getExcludedExport());
      }
      finally
      {
         uninstall(contextA);
      }
View Full Code Here

      MockClassLoadingMetaData a = new MockClassLoadingMetaData("a");
      a.setImportAll(true);
      KernelControllerContext contextA = install(a);
      try
      {
         MockClassLoaderPolicyModule module = assertModule(contextA);
         assertTrue(module.isImportAll());
      }
      finally
      {
         uninstall(contextA);
      }
View Full Code Here

      MockClassLoadingMetaData a = new MockClassLoadingMetaData("a");
      a.setJ2seClassLoadingCompliance(false);
      KernelControllerContext contextA = install(a);
      try
      {
         MockClassLoaderPolicyModule module = assertModule(contextA);
         assertFalse(module.isJ2seClassLoadingCompliance());
      }
      finally
      {
         uninstall(contextA);
      }
View Full Code Here

      capabilities.add(factory.createPackage("p2"));
      a.setCapabilities(capabilities);
      KernelControllerContext contextA = install(a);
      try
      {
         MockClassLoaderPolicyModule module = assertModule(contextA);
         assertEquals(capabilities, module.getCapabilities());
      }
      finally
      {
         uninstall(contextA);
      }
View Full Code Here

TOP

Related Classes of org.jboss.classloading.spi.dependency.policy.mock.MockClassLoaderPolicyModule

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.