Beispiel #1
0
        private static bool historyLevelCheck(ProcessEngine processEngine, RequiredHistoryLevel annotation)
        {
            ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl)processEngine.ProcessEngineConfiguration;

            HistoryLevel requiredHistoryLevel = getHistoryLevelForName(processEngineConfiguration.HistoryLevels, annotation.value());
            HistoryLevel currentHistoryLevel  = processEngineConfiguration.HistoryLevel;

            return(currentHistoryLevel.Id >= requiredHistoryLevel.Id);
        }
Beispiel #2
0
        public static bool annotationRequiredHistoryLevelCheck(ProcessEngine processEngine, Type testClass, string methodName)
        {
            RequiredHistoryLevel annotation = getAnnotation(processEngine, testClass, methodName, typeof(RequiredHistoryLevel));

            if (annotation != null)
            {
                return(historyLevelCheck(processEngine, annotation));
            }
            else
            {
                return(true);
            }
        }
Beispiel #3
0
        public static bool annotationRequiredHistoryLevelCheck(ProcessEngine processEngine, Description description)
        {
            RequiredHistoryLevel annotation = description.getAnnotation(typeof(RequiredHistoryLevel));

            if (annotation != null)
            {
                return(historyLevelCheck(processEngine, annotation));
            }
            else
            {
                return(annotationRequiredHistoryLevelCheck(processEngine, description.TestClass, description.MethodName));
            }
        }