public void OnITestSkipped_TransformsToITestFailed() { var inputMessage = Mocks.TestSkipped("The skipped test", "The skip reason"); sink.OnMessage(inputMessage); var outputMessage = innerSink.Captured(x => x.OnMessageWithTypes(null, null)).Arg<ITestFailed>(); Assert.Equal(inputMessage.Test, outputMessage.Test); Assert.Equal(0M, inputMessage.ExecutionTime); Assert.Empty(inputMessage.Output); Assert.Equal("FAIL_SKIP", outputMessage.ExceptionTypes.Single()); Assert.Equal("The skip reason", outputMessage.Messages.Single()); Assert.Empty(outputMessage.StackTraces.Single()); }
public void OnTestSkipped_TransformsToTestFailed() { var startingMessage = TestData.TestStarting(); var skippedMessage = TestData.TestSkipped(reason: "The skip reason"); sink.OnMessage(startingMessage); sink.OnMessage(skippedMessage); var outputMessage = Assert.Single(innerSink.Messages.OfType <_TestFailed>()); Assert.Equal(0M, skippedMessage.ExecutionTime); Assert.Empty(skippedMessage.Output); Assert.Equal("FAIL_SKIP", outputMessage.ExceptionTypes.Single()); Assert.Equal("The skip reason", outputMessage.Messages.Single()); var stackTrace = Assert.Single(outputMessage.StackTraces); Assert.Equal("", stackTrace); }