Package org.jboss.arquillian.impl.core

Examples of org.jboss.arquillian.impl.core.ObjectStore


         Assert.assertFalse(context.isActive());
        
         context.activate();
         Assert.assertTrue(context.isActive());
        
         ObjectStore store = context.getObjectStore();
         store.add(Boolean.class, true);
        
         Assert.assertEquals(
               "Verify that we can get objects from a active context",
               new Boolean(true),
               store.get(Boolean.class));
        
         context.deactivate();
         Assert.assertFalse(context.isActive());
        
         try
         {
            context.getObjectStore();
            Assert.fail("Trying to get ObjectStore outside active context should have thrown Exception");
         }
         catch (Exception e) {
         }
  
         context.activate();
         store = context.getObjectStore();
  
         Assert.assertEquals(
               "Verify that we can get objects from a active context",
               new Boolean(true),
               store.get(Boolean.class));
      }
      finally
      {
         context.deactivate();
         context.destroy();
View Full Code Here


   }
  
   @Override
   public void destroy(T id)
   {
      ObjectStore store = stores.remove(id);
      if(store != null)
      {
         store.clear();
      }
   }
View Full Code Here

   //-------------------------------------------------------------------------------------||
  
   private ObjectStore createObjectStore(T id)
   {
      Validate.notNull(id, "ID must be specified");
      ObjectStore store = new ObjectStore();
      ObjectStore previousStore = stores.putIfAbsent(id, store);
      if(previousStore != null)
      {
         return previousStore;
      }
      return store;
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.impl.core.ObjectStore

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.