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

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


   public TestResult test(TestMethodExecutor testMethodExecutor) throws Exception
   {
      Validate.notNull(testMethodExecutor, "TestMethodExecutor must be specified");

      final List<TestResult> result = new ArrayList<TestResult>();
      manager.fire(new Test(testMethodExecutor), new NonManagedObserver<Test>()
      {
         @Inject
         private Instance<TestResult> testResult;
        
         @Override
View Full Code Here


    }

    public void register_interceptor(@Observes EventContext<Test> ctx) {
        invoked = false;
        try {
            Test event = ctx.getEvent();
            if (event.getTestClass().getJavaClass() == TestInterceptorRegistration.class) {
                WebDriver browser = org.jboss.arquillian.graphene.context.GrapheneContext.getContextFor(Default.class).getWebDriver();
                ((GrapheneProxyInstance) browser).registerInterceptor(new Interceptor() {

                    @Override
                    public Object intercept(InvocationContext context) throws Throwable {
View Full Code Here

    @Inject
    private Instance<ResponsePayload> responsePayload;

    public void observeTestExecution(@Observes EventContext<Test> context) {
        Test event = context.getEvent();

        try {
            context.proceed();
        } finally {
            if (event.getTestMethodExecutor() instanceof LifecycleMethodExecutor) {
                List<Annotation> qualifiers = ((LifecycleMethodExecutor) event.getTestMethodExecutor()).getQualifiers();

                ExecutedMethod executedMethod = new ExecutedMethod(event.getTestMethod(), qualifiers);

                responsePayload.get().getExecutedMethods().add(executedMethod);
            }
        }
    }
View Full Code Here

    }

    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

    @Inject
    private Instance<ResponsePayload> responsePayload;

    public void observeTestExecution(@Observes EventContext<Test> context) {
        Test event = context.getEvent();

        try {
            context.proceed();
        } finally {
            if (event.getTestMethodExecutor() instanceof LifecycleMethodExecutor) {
                Annotation annotation = ((LifecycleMethodExecutor) event.getTestMethodExecutor()).getAnnotation();

                ExecutedMethod executedMethod = new ExecutedMethod(event.getTestMethod(), annotation);

                responsePayload.get().getExecutedMethods().add(executedMethod);
            }
        }
    }
View Full Code Here

    }

    private void executeTest(Object inspection, Method method, Annotation annotation) {
        before.fire(new Before(inspection, method));

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

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

        builder.observer(NamespaceTestObserver.class);
    }

    public static class NamespaceTestObserver {
        public void execute(@Observes EventContext<Test> context) {
            Test event = context.getEvent();

            Method testMethod = event.getTestMethod();
            WithinNamespace ns = testMethod.getAnnotation(WithinNamespace.class);
            if (ns == null) {
                ns = event.getTestClass().getAnnotation(WithinNamespace.class);
                if (ns == null) {
                    Class<?> testClass = event.getTestClass().getJavaClass();
                    ns = testClass.getPackage().getAnnotation(WithinNamespace.class);
                }
            }

            if (ns != null) {
View Full Code Here

TOP

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

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.