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

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


        bind(ApplicationScoped.class, ArquillianDescriptor.class, Descriptors.create(ArquillianDescriptor.class));
    }

    @Test
    public void configurationWasCreated() throws Exception {
        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


        verifyTimeout(0);
    }

    private void verifyTimeout(int timeout) {
        // when
        getManager().fire(new BeforeSuite());

        // then
        DroneRegistry registry = getManager().getContext(SuiteContext.class).getObjectStore().get(DroneRegistry.class);
        Assert.assertNotNull("Drone registry was created in the context", registry);
View Full Code Here

    @Inject
    Instance<ReusedSessionStore> store;

    @Test
    public void test_store_is_created_on_before_suite_event() {
        getManager().fire(new BeforeSuite());
        assertNotNull(store.get());
    }
View Full Code Here

    }

    @Test
    public void testPrecedence() throws Exception {
        getManager().fire(new BeforeSuite());

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

        Assert.assertNotNull("Configurator for MockDrone was created",
View Full Code Here

        when(configuration.isRemoteReusable()).thenReturn(true);
        when(configuration.getCapabilities()).thenReturn(desiredCapabilities);
        when(configuration.getRemoteAddress()).thenReturn(hubUrl);

        // when
        fire(new BeforeSuite());

        RemoteWebDriver webdriver1 = factory1.createInstance(configuration);
        factory1.destroyInstance(webdriver1);
        webdriver1.quit();
View Full Code Here

        when(configuration.isRemoteReusable()).thenReturn(true);
        when(configuration.getCapabilities()).thenReturn(desiredCapabilities);
        when(configuration.getRemoteAddress()).thenReturn(hubUrl);

        // when
        fire(new BeforeSuite());

        // creates new session
        RemoteWebDriver webdriver1 = factory1.createInstance(configuration);
        // persists session into store
        factory1.destroyInstance(webdriver1);
        // makes driver non-reusable
        webdriver1.quit();

        // new suite
        fire(new BeforeSuite());
        // pulls non-reusable session from store, so creates new session
        RemoteWebDriver webdriver2 = factory2.createInstance(configuration);
        // quit newly created session
        factory2.destroyInstance(webdriver2);
        webdriver2.quit();
        // persists available sessions (none should be available)
        // persistEvent.fire(new PersistReusedSessionsEvent());

        // new suite
        fire(new BeforeSuite());
        // pulls session - should *NOT* be empty
        ReusedSession reusedSession = sessionStore.get().pull(initializationParameter);
        assertNotNull("reusedSession must be stored", reusedSession);
        // pulls session - should be empty - it was cleared by last pull
        reusedSession = sessionStore.get().pull(initializationParameter);
View Full Code Here

        Object instance = new DummyClass();
        Method testDummyMethod = DummyClass.class.getMethod("testDummyMethod");

        getManager().getContext(TestContext.class).activate(instance);
        fire(new BeforeSuite());

        DroneContext context = getManager()
            .getContext(ApplicationContext.class).getObjectStore().get(DroneContext.class);
        Assert.assertNotNull("DroneContext was created in the context", context);
View Full Code Here

     *
     * @throws Exception if any error occurs
     */
    @Test
    public void testInitDependencyResolverNull() throws Exception {
        BeforeSuite event = new BeforeSuite();

        instance = mock(AbstractDependencyResolverProducer.class);

        Instance<SpringDeployerConfiguration> mockConfigurationInstance = mock(Instance.class);
        TestReflectionHelper.setFieldValue(instance, "configuration", mockConfigurationInstance);
View Full Code Here

     *
     * @throws Exception if any error occurs
     */
    @Test
    public void testInitDependencyResolver() throws Exception {
        BeforeSuite event = new BeforeSuite();

        AbstractDependencyResolver mockDependencyResolver = mock(AbstractDependencyResolver.class);

        instance = mock(AbstractDependencyResolverProducer.class);

View Full Code Here

      this.manager = manager;
   }

   public void beforeSuite() throws Exception
   {
      manager.fire(new BeforeSuite());
   }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.test.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.