Package com.gramant.jtr.annotation

Examples of com.gramant.jtr.annotation.Test


    private List<Method> getTestMethods(Class suiteClass, String group) {
        List<Method> testMethods = new ArrayList<Method>();
        Method[] methods = suiteClass.getMethods();
        for (Method method : methods) {
            Test test = method.getAnnotation(Test.class);
            if ((test != null) && (ArrayUtils.contains(test.groups(), group)))
                testMethods.add(method);
        }
        List<Method> testMethodsSorted = new ArrayList<Method>(testMethods.size());
        Method parentMethod = null;
        while ((parentMethod = getMethod(parentMethod, testMethods)) != null) {
View Full Code Here


        return testMethodsSorted;
    }

    private Method getMethod(Method parentMethod, List<Method> testMethods) {
        for (Method method : testMethods) {
            Test test = method.getAnnotation(Test.class);
            if (parentMethod == null) {
                if (test.parentMethod().equals(""))
                    return method;
            } else {
                if (test.parentMethod().equals(parentMethod.getName()))
                    return method;
            }
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of com.gramant.jtr.annotation.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.