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);
        }
Beispiel #3
0
 public ObservationTest(ObservationTestCase testCase, string displayName)
 {
     TestCase    = testCase;
     DisplayName = displayName;
 }
 public ObservationTest(ObservationTestCase testCase, string displayName)
 {
     TestCase = testCase;
     DisplayName = displayName;
 }