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

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


        fire(new ScreenshooterExtensionConfigured());

        initRecorderStrategyRegister();

        // false in annotation
        fire(new Before(FakeAnnotatedClass.class, FakeAnnotatedClass.class.getMethod("takeBeforeTestFalseMethod")));

        bind(TestScoped.class, TestResult.class, TestResult.passed());

        fire(new After(FakeAnnotatedClass.class, FakeAnnotatedClass.class.getMethod("takeBeforeTestFalseMethod")));
View Full Code Here


        fire(new ScreenshooterExtensionConfigured());

        initRecorderStrategyRegister();

        // true in annotation
        fire(new Before(FakeAnnotatedClass.class, FakeAnnotatedClass.class.getMethod("takeAfterTestMethod")));

        bind(TestScoped.class, TestResult.class, TestResult.passed());

        fire(new After(FakeAnnotatedClass.class, FakeAnnotatedClass.class.getMethod("takeAfterTestMethod")));
View Full Code Here

        fire(new ScreenshooterExtensionConfigured());

        initRecorderStrategyRegister();

        // true in annotation
        fire(new Before(FakeAnnotatedClass.class, FakeAnnotatedClass.class.getMethod("takeWhenTestFailedMethod")));

        bind(TestScoped.class, TestResult.class, TestResult.failed(new Throwable()));

        fire(new After(FakeAnnotatedClass.class, FakeAnnotatedClass.class.getMethod("takeWhenTestFailedMethod")));
View Full Code Here

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

        fire(new BeforeClass(MethodEnrichedClass.class));
        fire(new Before(instance, testMethod));

        DronePoint<MockDrone> dronePoint = new DronePointImpl<MockDrone>(MockDrone.class, DronePoint.Lifecycle.METHOD,
                AnnotationMocks.drone(), AnnotationMocks.methodArgumentOneQualifier());

        TestEnricher testEnricher = serviceLoader.onlyOne(TestEnricher.class);
View Full Code Here

                registry.getEntryFor(MockDrone.class, Configurator.class) instanceof MockDroneFactory);
        Assert.assertTrue("Instantiator is of mock type",
                registry.getEntryFor(MockDrone.class, Instantiator.class) instanceof MockDroneFactory);

        fire(new BeforeClass(MethodEnrichedClass.class));
        fire(new Before(instance, testMethod));

        TestEnricher testEnricher = serviceLoader.onlyOne(TestEnricher.class);

        testEnricher.enrich(instance);
        Object[] parameters = testEnricher.resolve(testMethod);
View Full Code Here

                registry.getEntryFor(MockDrone.class, Configurator.class) instanceof MockDroneFactory);
        Assert.assertTrue("Instantiator is of mock type",
                registry.getEntryFor(MockDrone.class, Instantiator.class) instanceof MockDroneFactory);

        fire(new BeforeClass(MethodEnrichedClassUnregistered.class));
        fire(new Before(instance, testMethod));

        TestEnricher testEnricher = serviceLoader.onlyOne(TestEnricher.class);
        testEnricher.enrich(instance);
        Object[] parameters = testEnricher.resolve(testMethod);
View Full Code Here

        fire(new BeforeClass(DummyClass.class));

        assertEventFired(BeforeDroneCallableCreated.class, 2);
        assertEventFired(AfterDroneCallableCreated.class, 2);

        fire(new Before(instance, testMethod));

        assertEventFired(BeforeDroneCallableCreated.class, 2);
        assertEventFired(AfterDroneCallableCreated.class, 2);

        assertEventFired(BeforeDroneInstantiated.class, 0);
View Full Code Here

        assertEventFired(BeforeDroneConfigured.class, 2);
        assertEventFired(AfterDroneConfigured.class, 2);
        assertEventFired(BeforeDroneCallableCreated.class, 2);
        assertEventFired(AfterDroneCallableCreated.class, 2);

        fire(new Before(instance, testDummyMethod));

        assertEventFired(BeforeDroneConfigured.class, 2);
        assertEventFired(AfterDroneConfigured.class, 2);
        assertEventFired(BeforeDroneCallableCreated.class, 2);
        assertEventFired(AfterDroneCallableCreated.class, 2);

        assertEventFired(BeforeDroneInstantiated.class, 0);
        assertEventFired(AfterDroneInstantiated.class, 0);

        TestEnricher testEnricher = serviceLoader.onlyOne(TestEnricher.class);
        testEnricher.enrich(instance);

        assertEventFired(BeforeDroneInstantiated.class, 2);
        assertEventFired(AfterDroneInstantiated.class, 2);

        Object[] dummyParameters = testEnricher.resolve(testDummyMethod);

        assertEventFired(BeforeDroneInstantiated.class, 2);
        assertEventFired(AfterDroneInstantiated.class, 2);

        testDummyMethod.invoke(instance, dummyParameters);

        fire(new After(instance, testDummyMethod));

        assertEventFired(BeforeDroneDestroyed.class, 0);
        assertEventFired(AfterDroneDestroyed.class, 0);

        fire(new Before(instance, testDummyMethodWithParameters));

        assertEventFired(BeforeDroneConfigured.class, 3);
        assertEventFired(AfterDroneConfigured.class, 3);
        assertEventFired(BeforeDroneCallableCreated.class, 3);
        assertEventFired(AfterDroneCallableCreated.class, 3);
View Full Code Here

   
    @Inject
    private Event<PluginContainerDiscovered> pluginContainerDiscovered;
   
    public void hookUp(@Observes EventContext<Before> ctx) {
        Before event = ctx.getEvent();
        lookup(event.getTestMethod().getAnnotations());
        ctx.proceed();
        pluginContainerDiscovered.fire(new PluginContainerDiscovered(event.getTestInstance(), event.getTestMethod()));
    }
View Full Code Here

        return true;
    }

    private void executeTest(Object inspection, Method method, List<Annotation> qualifiers) {
        before.fire(new Before(inspection, method));

        test.fire(new Test(new LifecycleMethodExecutor(inspection, method, qualifiers)));

        after.fire(new After(inspection, method));
    }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.test.spi.event.suite.Before

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.