コード例 #1
0
ファイル: TagTestCaseFilter.cs プロジェクト: tudway/Qart
        private bool ShouldProcess(TestCase testCase, IDictionary <string, string> options)
        {
            IEnumerable <string> tags = _tagProvider.GetTags(testCase).Select(t => t.ToLower()).ToList();

            var includeTags = new HashSet <string>(options.GetIncludeTags(), StringComparer.InvariantCultureIgnoreCase);
            var excludeTags = new HashSet <string>(options.GetExcludeTags(), StringComparer.InvariantCultureIgnoreCase);

            return(!includeTags.Any()
                ? tags.All(t => !excludeTags.Contains(t))
                : tags.Any(t => includeTags.Contains(t) && !excludeTags.Contains(t)));
        }