private static bool HistoryLevelCheck(IProcessEngine processEngine, RequiredHistoryLevelAttribute annotation) { var processEngineConfiguration = (ProcessEngineConfigurationImpl)processEngine.ProcessEngineConfiguration; var requiredHistoryLevel = GetHistoryLevelForName(processEngineConfiguration.HistoryLevels, annotation.value); var currentHistoryLevel = processEngineConfiguration.HistoryLevel; return(currentHistoryLevel.Id >= requiredHistoryLevel.Id); }
public static bool AnnotationRequiredHistoryLevelCheck(IProcessEngine processEngine, Description description) { RequiredHistoryLevelAttribute annotation = description.GetAnnotation <RequiredHistoryLevelAttribute>(typeof(RequiredHistoryLevelAttribute)); if (annotation != null) { return(HistoryLevelCheck(processEngine, annotation)); } else { return(AnnotationRequiredHistoryLevelCheck(processEngine, description.TestClass, description.MethodName)); } }