Package org.jboss.arquillian.spi.event.suite

Examples of org.jboss.arquillian.spi.event.suite.BeforeSuite


   public void beforeSuite() throws Exception
   {
      Context suiteContext = contextLifecycle.createRestoreSuiteContext();
      try
      {
         suiteContext.fire(new BeforeSuite());
      }
      finally
      {
         activeContext.push(suiteContext);        
      }
View Full Code Here


   }
  
   public void beforeSuite() throws Exception
   {
      Context suiteContext = contextLifecycle.createRestoreSuiteContext();
      suiteContext.fire(new BeforeSuite());
      activeContext.push(suiteContext);
   }
View Full Code Here

   public void beforeSuite() throws Exception
   {
      Context suiteContext = contextLifecycle.createRestoreSuiteContext();
      try
      {
         suiteContext.fire(new BeforeSuite());
      }
      finally
      {
         activeContext.push(suiteContext);
      }
View Full Code Here

   }

   @Test
   public void shouldSetupAndStartContainers() throws Exception
   {
      fire(new BeforeSuite());
     
      assertEventFired(SetupContainers.class, 1);
      assertEventFired(StartManagedContainers.class, 1);
   }
View Full Code Here

      manager.getContext(ClassContext.class).activate(EnrichedClass.class);

      Mockito.when(serviceLoader.all(Configurator.class))
            .thenReturn(Arrays.<Configurator> asList(new DefaultSeleniumFactory(), new WebDriverFactory(), new MockDroneFactory()));

      manager.fire(new BeforeSuite());

      DroneRegistry registry = manager.getContext(SuiteContext.class).getObjectStore().get(DroneRegistry.class);
      Assert.assertNotNull("Drone registry was created in the context", registry);

      Assert.assertTrue("Configurator is of mock type", registry.getConfiguratorFor(MockDroneInstance.class) instanceof MockDroneFactory);
View Full Code Here

      Mockito.when(serviceLoader.all(Destructor.class))
            .thenReturn(Arrays.<Destructor> asList(new MockDroneFactory()));
      Mockito.when(serviceLoader.all(TestEnricher.class))
            .thenReturn(Arrays.<TestEnricher> asList(testEnricher));

      manager.fire(new BeforeSuite());

      DroneRegistry registry = manager.getContext(SuiteContext.class).getObjectStore().get(DroneRegistry.class);
      Assert.assertNotNull("Drone registry was created in the context", registry);

      Assert.assertTrue("Configurator is of mock type", registry.getConfiguratorFor(MockDroneInstance.class) instanceof MockDroneFactory);
View Full Code Here

   @SuppressWarnings("rawtypes")
   public void testPrecedence() throws Exception
   {
      Mockito.when(serviceLoader.all(Configurator.class)).thenReturn(Arrays.<Configurator> asList(new DefaultSeleniumFactory(), new WebDriverFactory(), new MockConfigurator()));

      manager.fire(new BeforeSuite());

      DroneRegistry registry = manager.getContext(SuiteContext.class).getObjectStore().get(DroneRegistry.class);
      Assert.assertNotNull("Drone registry was created in the context", registry);

      Assert.assertTrue("Configurator is of mock type", registry.getConfiguratorFor(DefaultSelenium.class) instanceof MockConfigurator);
View Full Code Here

   @Test
   public void configurationWasCreated() throws Exception
   {
      bind(ApplicationScoped.class, ArquillianDescriptor.class, Descriptors.create(ArquillianDescriptor.class));
      fire(new BeforeSuite());

      SeleniumServerConfiguration selConf = getManager().getContext(SuiteContext.class).getObjectStore().get(SeleniumServerConfiguration.class);

      Assert.assertNotNull("Selenium configuration was created in context", selConf);   
   }
View Full Code Here

      System.setProperty("arquillian.selenium.server.port", "54321");
     
      bind(ApplicationScoped.class, ArquillianDescriptor.class, Descriptors.create(ArquillianDescriptor.class)
            .extension("selenium-server")
               .property("port", "12345"));
      fire(new BeforeSuite());

      SeleniumServerConfiguration selConf = getManager().getContext(SuiteContext.class).getObjectStore().get(SeleniumServerConfiguration.class);

      Assert.assertNotNull("Selenium Server configuration was created in context", selConf);
      Assert.assertEquals("Selenium Server configuration is configured with port 54321, from System properties", 54321, selConf.getPort());
View Full Code Here

   public void beforeSuite() throws Exception
   {
      Context suiteContext = contextLifecycle.createRestoreSuiteContext();
      try
      {
         suiteContext.fire(new BeforeSuite());
      }
      finally
      {
         activeContext.push(suiteContext);        
      }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.spi.event.suite.BeforeSuite

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.