Package org.jboss.arquillian.core.test.context

Examples of org.jboss.arquillian.core.test.context.ManagerTest2ContextImpl


   }

   @Test
   public void shouldBeAbleToStackContextOfSameType()
   {
      ManagerTest2Context context = new ManagerTest2ContextImpl();

      try
      {
         context.activate("PARENT");
         context.getObjectStore().add(String.class, "test");

         try
         {
            context.activate("CHILD");
            Assert.assertNull(
                  "Should not be able to read from previously stacked context",
                  context.getObjectStore().get(String.class));

         }
         finally
         {
            context.deactivate();
         }

         Assert.assertTrue(
               "Outer Context should still be active",
               context.isActive());
      }
      finally
      {
         context.deactivate();
         context.clearAll();
      }
   }
View Full Code Here


   }
  
   @Test
   public void shouldBeAbleToStackContextOfSameType()
   {
      ManagerTest2Context context = new ManagerTest2ContextImpl();     
     
      try
      {
         context.activate("PARENT");
         context.getObjectStore().add(String.class, "test");
        
         try
         {
            context.activate("CHILD");
            Assert.assertNull(
                  "Should not be able to read from previously stacked context",
                  context.getObjectStore().get(String.class));
           
         }
         finally
         {
            context.deactivate();
         }
        
         Assert.assertTrue(
               "Outer Context should still be active",
               context.isActive());
      }
      finally
      {
         context.deactivate();
         context.clearAll();
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.core.test.context.ManagerTest2ContextImpl

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.