Examples of CitrusTest


Examples of com.consol.citrus.dsl.annotations.CitrusTest

    @Override
    public void run(final IHookCallBack callBack, ITestResult testResult) {
        Method method = testResult.getMethod().getConstructorOrMethod().getMethod();

        if (method != null && method.getAnnotation(CitrusTest.class) != null) {
            CitrusTest citrusTestAnnotation = method.getAnnotation(CitrusTest.class);

            init();

            if (StringUtils.hasText(citrusTestAnnotation.name())) {
                name(citrusTestAnnotation.name());
            } else {
                name(method.getName());
            }

            if (getParameterValues() != null && getParameterValues().length > 0) {
View Full Code Here

Examples of com.consol.citrus.dsl.annotations.CitrusTest

            AutowireCapableBeanFactory beanFactory = applicationContextHolder.getApplicationContext().getAutowireCapableBeanFactory();
            beanFactory.autowireBeanProperties(builder, AutowireCapableBeanFactory.AUTOWIRE_NO, false);
            beanFactory.initializeBean(builder, testBuilderClass.getName());

            for (Method method : ReflectionUtils.getAllDeclaredMethods(testBuilderClass)) {
                CitrusTest citrusTestAnnotation = method.getAnnotation(CitrusTest.class);
                if (citrusTestAnnotation != null) {
                    if (StringUtils.hasText(methodName)) {
                        if (StringUtils.hasText(citrusTestAnnotation.name())) {
                            if (!citrusTestAnnotation.name().equals(methodName)) {
                                continue;
                            }
                        } else if (!method.getName().equals(methodName)) {
                           continue;
                        }
View Full Code Here

Examples of com.consol.citrus.dsl.annotations.CitrusTest

    private String getMethodName(String methodName, Class<?> testClass) {
        if (ReflectionUtils.findMethod(testClass, methodName) != null) {
            return methodName;
        } else {
            for (Method method : ReflectionUtils.getAllDeclaredMethods(testClass)) {
                CitrusTest citrusTestAnnotation = method.getAnnotation(CitrusTest.class);
                if (citrusTestAnnotation != null
                        && StringUtils.hasText(citrusTestAnnotation.name())
                        && citrusTestAnnotation.name().equals(methodName)) {
                    return method.getName();
                }
            }
        }
View Full Code Here

Examples of com.consol.citrus.dsl.annotations.CitrusTest

     */
    private List<String> getTestMethods(Class<?> testClass) {
        List<String> methodNames = new ArrayList<String>();
        for (Method method : ReflectionUtils.getAllDeclaredMethods(testClass)) {
            if (method.getAnnotation(CitrusTest.class) != null) {
                CitrusTest citrusAnnotation = method.getAnnotation(CitrusTest.class);

                if (StringUtils.hasText(citrusAnnotation.name())) {
                    methodNames.add(citrusAnnotation.name());
                } else {
                    // use default method name as test
                    methodNames.add(method.getName());
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.