Package org.easetech.easytest.annotation

Examples of org.easetech.easytest.annotation.TestPolicy


    /**
     * @param testClass
     * @see TestConfigUtil#loadTestBeanConfig(Class)
     */
    public static void loadBeanConfiguration(Class<?> testClass) {
        TestPolicy testPolicy = testClass.getAnnotation(TestPolicy.class);
        if (testPolicy != null) {
            TestConfigUtil.loadTestBeanConfig(testPolicy.value());
        }
        TestConfigUtil.loadTestBeanConfig(testClass);
    }
View Full Code Here


     * @param testClass
     * @param writableData
     */
    public static void loadClassLevelData(Class<?> klass, TestClass testClass,
        Map<String, List<Map<String, Object>>> writableData) {
        TestPolicy testPolicy = testClass.getJavaClass().getAnnotation(TestPolicy.class);
        if (testPolicy != null) {
            DataLoaderUtil.loadData(testPolicy.value(), null, testClass, writableData);
        }
        DataLoaderUtil.loadData(klass, null, testClass, writableData);
    }
View Full Code Here

    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;
View Full Code Here

    }
   
   
    private Format formatToUse(EasyFrameworkMethod testMethod) {
        Format policyLevelFormat = null;
        TestPolicy testPolicy = fClass.getJavaClass().getAnnotation(TestPolicy.class);
        if(testPolicy != null) {
            policyLevelFormat = testPolicy.value().getAnnotation(Format.class);
        }
        Format classLevelFormat = fClass.getJavaClass().getAnnotation(Format.class);
        Format methodLevelFormat = testMethod.getAnnotation(Format.class);
        Format formatToUse = methodLevelFormat != null ? methodLevelFormat : classLevelFormat != null ? classLevelFormat : policyLevelFormat;
        return formatToUse;
View Full Code Here

    }

    private Future<Boolean> processReports(ReportDataContainer testReportContainer) {
      Future<Boolean> submit = null;
        if (testReportContainer != null) {
            TestPolicy testPolicy = testReportContainer.getTestClass().getAnnotation(TestPolicy.class);
            Report policyLevelReport = null;
            if(testPolicy != null) {
                Class<?> policyClass = testPolicy.value();
                policyLevelReport = policyClass.getAnnotation(Report.class);
            }
            Report testClassLevelReport = testReportContainer.getTestClass().getAnnotation(Report.class);
          Report annotation = testClassLevelReport != null ? testClassLevelReport : policyLevelReport;
View Full Code Here

*/
public class RunnerUtil {

    public static RunnerScheduler getScheduler(Class<?> testClass) {
        RunnerScheduler scheduler = null;
        TestPolicy testPolicy = testClass.getAnnotation(TestPolicy.class);
        if (testPolicy != null) {
            Class<?> policyClass = testPolicy.value();
            scheduler = SchedulerStrategy.getScheduler(policyClass, false);
            RunnerScheduler testClassScheduler = SchedulerStrategy.getScheduler(testClass, true);
            if (testClassScheduler != null) {
                scheduler = testClassScheduler;
            }
View Full Code Here

TOP

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

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.