bool FindTestsForMethod(ITestMethod testMethod, TestMethodDisplay defaultMethodDisplay, bool includeSourceInformation, IMessageBus messageBus) { var observationAttribute = testMethod.Method.GetCustomAttributes(typeof(ObservationAttribute)).FirstOrDefault(); if (observationAttribute == null) return true; var testCase = new ObservationTestCase(defaultMethodDisplay, testMethod); if (!ReportDiscoveredTestCase(testCase, includeSourceInformation, messageBus)) return false; return true; }
bool FindTestsForMethod(ITestMethod testMethod, TestMethodDisplay defaultMethodDisplay, bool includeSourceInformation, IMessageBus messageBus) { var observationAttribute = testMethod.Method.GetCustomAttributes(typeof(ObservationAttribute)).FirstOrDefault(); if (observationAttribute == null) { return(true); } var testCase = new ObservationTestCase(defaultMethodDisplay, testMethod); if (!ReportDiscoveredTestCase(testCase, includeSourceInformation, messageBus)) { return(false); } return(true); }
public ObservationTest(ObservationTestCase testCase, string displayName) { TestCase = testCase; DisplayName = displayName; }