public ISuiteResult hasTest(string expectedName, Action<ITestResult> handler)
        {
            var tests = GetTestsWithName(s => s.EndsWith(expectedName, StringComparison.InvariantCultureIgnoreCase));

            Assert.AreEqual(1, tests.Count(),
                String.Format("Expected test not found in suite {0}, expected test named {1}", _name, expectedName));

            var name = tests.Single().Attribute("name").Value;

            var testResult = new NUnitTestResult(tests.Single());

            handler(testResult);

            return this;
        }
Beispiel #2
0
        public ISuiteResult hasTest(string expectedName, Action <ITestResult> handler)
        {
            var tests = GetTestsWithName(s => s.EndsWith(expectedName, StringComparison.InvariantCultureIgnoreCase));

            Assert.AreEqual(1, tests.Count(),
                            String.Format("Expected test not found in suite {0}, expected test named {1}", _name, expectedName));

            var name = tests.Single().Attribute("name").Value;

            var testResult = new NUnitTestResult(tests.Single());

            handler(testResult);

            return(this);
        }