Package org.easetech.easytest.annotation

Examples of org.easetech.easytest.annotation.Display


        return null;
    }

    public static String getTestName(final TestClass testClass, final FrameworkMethod method) {
        String testName = method.getName();
        Display methodDisplay = method.getMethod().getAnnotation(Display.class);
        Display classDisplay = testClass.getJavaClass().getAnnotation(Display.class);
        Display policyDisplay = null;
        TestPolicy testPolicy = testClass.getJavaClass().getAnnotation(TestPolicy.class);
        if (testPolicy != null) {
            Class<?> policyClass = testPolicy.value();
            policyDisplay = policyClass.getAnnotation(Display.class);
        }
        Display displayAnnotation = methodDisplay != null ? methodDisplay : classDisplay != null ? classDisplay
            : policyDisplay;

        if (displayAnnotation != null) {
            StringBuilder fieldsToConcatenate = new StringBuilder("");
            String[] fields = displayAnnotation.fields();
            EasyFrameworkMethod fMethod = (EasyFrameworkMethod) method;
            Map<String, Object> testData = fMethod.getTestData();
            if (testData != null) {
                for (int i = 0; i < fields.length; i++) {
                    Object data = testData.get(fields[i]);
View Full Code Here

TOP

Related Classes of org.easetech.easytest.annotation.Display

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.