Package org.jboss.arquillian.core.spi

Examples of org.jboss.arquillian.core.spi.Extension


   private List<Extension> createExtensions(Collection<Class<?>> extensionClasses) throws Exception
   {
      List<Extension> created = new ArrayList<Extension>();
      for(Class<?> extensionClass : extensionClasses)
      {
         Extension extension = ExtensionImpl.of(Reflections.createInstance(extensionClass));
         inject(extension);
         created.add(extension);
      }
      return created;
   }
View Full Code Here


   private List<Extension> createExtensions(Collection<Class<?>> extensionClasses) throws Exception
   {
      List<Extension> created = new ArrayList<Extension>();
      for(Class<?> extensionClass : extensionClasses)
      {
         Extension extension = ExtensionImpl.of(Reflections.createInstance(extensionClass));
         inject(extension);
         created.add(extension);
      }
      return created;
   }
View Full Code Here

   private List<Extension> createExtensions(Collection<Class<?>> extensionClasses) throws Exception
   {
      List<Extension> created = new ArrayList<Extension>();
      for(Class<?> extensionClass : extensionClasses)
      {
         Extension extension = ExtensionImpl.of(Reflections.createInstance(extensionClass));
         inject(extension);
         created.add(extension);
      }
      return created;
   }
View Full Code Here

   private List<Extension> createExtensions(Collection<Class<?>> extensionClasses) throws Exception
   {
      List<Extension> created = new ArrayList<Extension>();
      for(Class<?> extensionClass : extensionClasses)
      {
         Extension extension = ExtensionImpl.of(Reflections.createInstance(extensionClass));
         inject(extension);
         created.add(extension);
      }
      return created;
   }
View Full Code Here

   private List<Extension> createExtensions(Collection<Class<?>> extensionClasses) throws Exception
   {
      List<Extension> created = new ArrayList<Extension>();
      for(Class<?> extensionClass : extensionClasses)
      {
         Extension extension = ExtensionImpl.of(Reflections.createInstance(extensionClass));
         inject(extension);
         created.add(extension);
      }
      return created;
   }
View Full Code Here

{
   @Test
   public void shouldBeAbleToReadAndInvokeObserverMethods() throws Exception
   {
      ExtensionWithObservers target = new ExtensionWithObservers();
      Extension extension = ExtensionImpl.of(target);
     
      Assert.assertEquals(
            "Verify correct observer methods were found",
            2, extension.getObservers().size());
     
      for(ObserverMethod observer : extension.getObservers())
      {
         observer.invoke(null, new String());
      }
     
      Assert.assertTrue(target.methodOneWasCalled);
View Full Code Here

   @Test
   public void shouldBeAbleToReadAndInvokeInjectionPoints() throws Exception
   {
      ExtensionWithInjection target = new ExtensionWithInjection();
      Extension extension = ExtensionImpl.of(target);
     
      Assert.assertEquals(
            "Verify correct injection fields were found",
            1, extension.getInjectionPoints().size());
     
      Instance<Object> instance = new DummyInstanceImpl();
      for(InjectionPoint point : extension.getInjectionPoints())
      {
         point.set(instance);
      }
      extension.getObservers().get(0).invoke(null, new Object());
     
      Assert.assertTrue(target.methodOneWasCalled);
      Assert.assertNotNull(instance.get());
   }
View Full Code Here

  
   @Test
   public void shouldBeAbleToInjectEventAndFireNewEvent() throws Exception
   {
      ExtensionWithEvent target = new ExtensionWithEvent();
      Extension extension = ExtensionImpl.of(target);
     
      Assert.assertEquals(
            "Verify correct event fields were found",
            1, extension.getEventPoints().size());
     
      Assert.assertEquals(1, extension.getObservers().size());
     
      DummyEventImpl event = new DummyEventImpl();
      for(EventPoint point : extension.getEventPoints())
      {
         point.set(event);
      }
      extension.getObservers().get(0).invoke(null, new Object())
     
      Assert.assertTrue(target.methodOneWasCalled);
      Assert.assertEquals(
            "Verify the Extensions Event was firable",
            "some string", event.getString());
View Full Code Here

   private List<Extension> createExtensions(Collection<Class<?>> extensionClasses) throws Exception
   {
      List<Extension> created = new ArrayList<Extension>();
      for(Class<?> extensionClass : extensionClasses)
      {
         Extension extension = ExtensionImpl.of(Reflections.createInstance(extensionClass));
         inject(extension);
         created.add(extension);
      }
      return created;
   }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.core.spi.Extension

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.