protected virtual void FillDataMembersRelatedToTestCaseSelectionCriteria() { _testCategoryFilter = TestCategoryFilter.GetTestCategoryFilter(this.TestConfig.TestCategories); var testObjects = this.TestConfig.TestClasses.Split('|') .Where(x => !string.IsNullOrEmpty(x.Trim())).Select(x => x.Trim()).Distinct(); foreach (var testClass in testObjects) { TestClassesToBeConsidered.Add(testClass); } testObjects = this.TestConfig.SemicolonSeparatedTestCases.Split(';') .Where(x => !string.IsNullOrEmpty(x.Trim())).Select(x => x.Trim()).Distinct(); foreach (var testCase in testObjects) { TestCasesToBeConsidered.Add(testCase); } testObjects = this.TestConfig.SemicolonSeparatedTestCasesToBeSkipped.Split(';') .Where(x => !string.IsNullOrEmpty(x.Trim())).Select(x => x.Trim()).Distinct(); foreach (var testClass in testObjects) { TestCasesToBeSkipped.Add(testClass); } }
public static TestCategoryFilter GetTestCategoryFilter(string strTestCategories) { TestCategoryFilter testCategoryFilter = null; lock (_dicTestCategoryFilterByStringOfTestCategories) { if (_dicTestCategoryFilterByStringOfTestCategories.ContainsKey(strTestCategories)) { testCategoryFilter = _dicTestCategoryFilterByStringOfTestCategories[strTestCategories]; } else { testCategoryFilter = new TestCategoryFilter(strTestCategories); _dicTestCategoryFilterByStringOfTestCategories.Add(strTestCategories, testCategoryFilter); } } return(testCategoryFilter); }