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); }
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); } }
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)); } }