Package org.ops4j.pax.exam

Examples of org.ops4j.pax.exam.TestInstantiationInstruction


            }

            MethodInstance newInstance = new MethodInstance(frameworkMethod);
            newInstances.add(newInstance);
            methodToAddressMap.put(frameworkMethod.getMethodName(), address);
            testDirectory.add(address, new TestInstantiationInstruction(frameworkMethod
                .getRealClass().getName() + ";" + javaMethod.getName()));

        }
        Collections.sort(newInstances, new IMethodInstanceComparator());
        return newInstances;
View Full Code Here


            String methodName = frameworkMethod.getName();

            if (frameworkMethodClass.isAssignableFrom(getTestClass().getJavaClass())) {
                FrameworkMethod method = mangleMethodNames ? new DecoratedFrameworkMethod(address,
                    frameworkMethod) : frameworkMethod;
                testDirectory.add(address, new TestInstantiationInstruction(className + ";"
                    + methodName));

                methodToTestAddressMap.put(method, address);
            }
        }
View Full Code Here

        this.testDirectory = TestDirectory.getInstance();
        this.cm = new ConfigurationManager();
    }

    public synchronized void call(TestAddress address) {
        TestInstantiationInstruction instruction = testDirectory.lookup(address);
        ProbeInvokerFactory probeInvokerFactory = ServiceProviderFinder
            .loadUniqueServiceProvider(ProbeInvokerFactory.class);
        ProbeInvoker invoker = probeInvokerFactory.createProbeInvoker(null, instruction.toString());
        invoker.call(address.arguments());
    }
View Full Code Here

            String className = frameworkMethodClass.getName();
            String methodName = frameworkMethod.getName();

            if (frameworkMethodClass.isAssignableFrom(getTestClass().getJavaClass())) {
                FrameworkMethod method = new ParameterizedFrameworkMethod(address, frameworkMethod);
                testDirectory.add(address, new TestInstantiationInstruction(className + ";"
                    + methodName));

                methodToTestAddressMap.put(method, address);
            }
        }
View Full Code Here

         * args are only used for parameterized tests. A single integer argument is the parameter index.
         */
        if (args.length > 0) {
            instruction = instruction + ";" + args[0];
        }
        probeCalls.put(address, new TestInstantiationInstruction(instruction));
        return address;
    }
View Full Code Here

        this.system = system;
        this.testDirectory = TestDirectory.getInstance();
    }

    public synchronized void call(TestAddress address) {
        TestInstantiationInstruction instruction = testDirectory.lookup(address);
        ProbeInvokerFactory probeInvokerFactory = ServiceProviderFinder
            .loadUniqueServiceProvider(ProbeInvokerFactory.class);
        ProbeInvoker invoker = probeInvokerFactory.createProbeInvoker(null, instruction.toString());
        invoker.call(address.arguments());
    }
View Full Code Here

     * Calls a test with the given address. In Java EE mode, we lookup the test from the test
     * directory and invoke it via probe invoker obtained from the Java SE service loader. (This
     * invoker uses a servlet bridge,)
     */
    public synchronized void call(TestAddress address) {
        TestInstantiationInstruction instruction = testDirectory.lookup(address);
        ProbeInvokerFactory probeInvokerFactory = ServiceProviderFinder
            .loadUniqueServiceProvider(ProbeInvokerFactory.class);
        ProbeInvoker invoker = probeInvokerFactory.createProbeInvoker(null, instruction.toString());
        invoker.call(address.arguments());
    }
View Full Code Here

    }

    public TestAddress addTest(Class<?> clazz, String methodName, Object... args) {
        TestAddress address = new DefaultTestAddress(clazz.getName() + "." + methodName, args);
        probeCalls.put(address,
            new TestInstantiationInstruction(clazz.getName() + ";" + methodName));
        addAnchor(clazz);
        return address;
    }
View Full Code Here

TOP

Related Classes of org.ops4j.pax.exam.TestInstantiationInstruction

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.