private static void ValidatePredfinedItemTestStrings(PredefinedFolder folder, PredefinedItem item) { Assert.IsNotNull(item.TestSuccessStrings, $"[{folder.Name}/{item.Name}] does not have TestSuccessStrings defined"); Assert.IsTrue(item.TestSuccessStrings.Any(), $"[{item.Name}] does not have TestSuccessStrings defined"); Assert.IsNotNull(item.TestFailStrings, $"[{folder.Name}/{item.Name}] does not have TestFailStrings defined"); Assert.IsTrue(item.TestFailStrings.Any(), $"[{folder.Name}/{item.Name}] does not have TestFailStrings defined"); }
private static void TestPredefined(ILineFilter filter, TestResult testResult, PredefinedFolder folder, PredefinedItem item) { var result = filter.IsMatch(testResult.TestString); Assert.IsNotNull(testResult.ExpectedFilterResult, $"[{folder.Name}/{item.Name}] has not defined ExpectedFilterResult"); Assert.AreEqual(testResult.ExpectedFilterResult.IsMatch, result.IsMatch, $"[{folder.Name}/{item.Name}] failed IsMatch for '{testResult.TestString}'"); Assert.AreEqual(testResult.ExpectedFilterResult.HighlightColor, result.HighlightColor, $"[{folder.Name}/{item.Name}] failed HighlightColor for '{testResult.TestString}'"); if (testResult.ExpectedFilterResult.Result != null) { Assert.AreEqual(testResult.ExpectedFilterResult.Result, result.Result, $"{folder.Name}/[{item.Name}] failed Result for '{testResult.TestString}'"); } }