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

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


      assertNoModule(contextA);
   }
  
   public void testExcludedExport() throws Exception
   {
      MockClassLoadingMetaData a = new MockClassLoadingMetaData("a");
      a.setExcludedExport(ClassFilterUtils.JAVA_ONLY);
      KernelControllerContext contextA = install(a);
      try
      {
         MockClassLoaderPolicyModule module = assertModule(contextA);
         assertEquals(ClassFilterUtils.JAVA_ONLY, module.getExcludedExport());
View Full Code Here


      assertNoModule(contextA);
   }
  
   public void testImportAll() throws Exception
   {
      MockClassLoadingMetaData a = new MockClassLoadingMetaData("a");
      a.setImportAll(true);
      KernelControllerContext contextA = install(a);
      try
      {
         MockClassLoaderPolicyModule module = assertModule(contextA);
         assertTrue(module.isImportAll());
View Full Code Here

      assertNoModule(contextA);
   }
  
   public void testJ2seClassLoading() throws Exception
   {
      MockClassLoadingMetaData a = new MockClassLoadingMetaData("a");
      a.setJ2seClassLoadingCompliance(false);
      KernelControllerContext contextA = install(a);
      try
      {
         MockClassLoaderPolicyModule module = assertModule(contextA);
         assertFalse(module.isJ2seClassLoadingCompliance());
View Full Code Here

      assertNoModule(contextA);
   }
  
   public void testManualCapabilities() throws Exception
   {
      MockClassLoadingMetaData a = new MockClassLoadingMetaData("a");
      ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();
      List<Capability> capabilities = new ArrayList<Capability>();
      capabilities.add(factory.createModule("b"));
      capabilities.add(factory.createPackage("p1"));
      capabilities.add(factory.createPackage("p2"));
      a.setCapabilities(capabilities);
      KernelControllerContext contextA = install(a);
      try
      {
         MockClassLoaderPolicyModule module = assertModule(contextA);
         assertEquals(capabilities, module.getCapabilities());
View Full Code Here

      assertNoModule(contextA);
   }
  
   public void testAutoCapabilities() throws Exception
   {
      MockClassLoadingMetaData a = new MockClassLoadingMetaData("a");
      a.setPathsAndPackageNames(A.class, B.class);
      KernelControllerContext contextA = install(a);
      try
      {
         MockClassLoaderPolicyModule module = assertModule(contextA);
         ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();
View Full Code Here

      assertNoModule(contextA);
   }
  
   public void testRequirements() throws Exception
   {
      MockClassLoadingMetaData a = new MockClassLoadingMetaData("a");
      ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();
      List<Requirement> requirements = new ArrayList<Requirement>();
      requirements.add(factory.createRequireModule("b"));
      requirements.add(factory.createRequirePackage(B.class.getPackage().getName()));
      a.setRequirements(requirements);
      KernelControllerContext contextA = install(a);
      try
      {
         MockClassLoadingMetaData b = new MockClassLoadingMetaData("b");
         b.setPathsAndPackageNames(B.class);
         KernelControllerContext contextB = install(b);
         try
         {
            MockClassLoaderPolicyModule module = assertModule(contextA);
            assertEquals(requirements, module.getRequirements());
View Full Code Here

      super(name);
   }
  
   public void testSplitPackageDefault() throws Exception
   {
      MockClassLoadingMetaData ab = getModuleAB(null);
      MockClassLoadingMetaData ac = getModuleAC(null);
     
      KernelControllerContext contextAB = install(ab);
      try
      {
         ClassLoader clAB = assertClassLoader(contextAB);
View Full Code Here

      assertNoClassLoader(contextAB);
   }

   public void testSplitPackageError() throws Exception
   {
      MockClassLoadingMetaData ab = getModuleAB(null);
      MockClassLoadingMetaData ac = getModuleAC(SplitPackagePolicy.Error);
     
      KernelControllerContext contextAB = install(ab);
      try
      {
         ClassLoader clAB = assertClassLoader(contextAB);
View Full Code Here

      assertNoClassLoader(contextAB);
   }

   public void testSplitPackageFirst() throws Exception
   {
      MockClassLoadingMetaData ab = getModuleAB(null);
      MockClassLoadingMetaData ac = getModuleAC(SplitPackagePolicy.First);
     
      KernelControllerContext contextAB = install(ab);
      try
      {
         ClassLoader clAB = assertClassLoader(contextAB);
View Full Code Here

      assertNoClassLoader(contextAB);
   }

   public void testSplitPackageLast() throws Exception
   {
      MockClassLoadingMetaData ab = getModuleAB(null);
      MockClassLoadingMetaData ac = getModuleAC(SplitPackagePolicy.Last);
     
      KernelControllerContext contextAB = install(ab);
      try
      {
         ClassLoader clAB = assertClassLoader(contextAB);
View Full Code Here

TOP

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

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.