public void GetTestResults_OutputWithSkippedTestAsLastTest_AllResultsAreFound() { var cases = new List <TestCase> { TestDataCreator.ToTestCase("Test.Succeed", TestDataCreator.DummyExecutable, @"c:\somepath\source.cpp"), TestDataCreator.ToTestCase("Test.Skip", TestDataCreator.DummyExecutable, @"c:\somepath\source.cpp"), TestDataCreator.ToTestCase("Test.Fail", TestDataCreator.DummyExecutable, @"c:\somepath\source.cpp"), }; var results = new StandardOutputTestResultParser(cases, ConsoleOutputWithSkippedTestAsLastTest, TestEnvironment.Logger).GetTestResults(); results.Should().HaveCount(3); var result = results[0]; result.TestCase.FullyQualifiedName.Should().Be("Test.Succeed"); XmlTestResultParserTests.AssertTestResultIsPassed(result); result = results[1]; result.TestCase.FullyQualifiedName.Should().Be("Test.Fail"); XmlTestResultParserTests.AssertTestResultIsFailure(result); result = results[2]; result.TestCase.FullyQualifiedName.Should().Be("Test.Skip"); XmlTestResultParserTests.AssertTestResultIsSkipped(result); }
public void GetTestResults_OutputWithPrefixingTest_BothTestsAreFound() { var cases = new List <TestCase> { TestDataCreator.ToTestCase("Test.AB", TestDataCreator.DummyExecutable, @"c:\users\chris\documents\visual studio 2015\projects\consoleapplication1\consoleapplication1tests\source.cpp"), TestDataCreator.ToTestCase("Test.A", TestDataCreator.DummyExecutable, @"c:\users\chris\documents\visual studio 2015\projects\consoleapplication1\consoleapplication1tests\source.cpp") }; var results = new StandardOutputTestResultParser(cases, ConsoleOutputWithPrefixingTest, TestEnvironment.Logger) .GetTestResults(); results.Should().HaveCount(2); results[0].TestCase.FullyQualifiedName.Should().Be("Test.AB"); XmlTestResultParserTests.AssertTestResultIsPassed(results[0]); results[1].TestCase.FullyQualifiedName.Should().Be("Test.A"); XmlTestResultParserTests.AssertTestResultIsPassed(results[1]); }