public void WriteTestPassed_ShouldOutputTestFinishedMessage() { _subject = new TestLogger(0, "test1"); _subject.WriteTestPassed(new TimeSpan(0,0,0,0,30)); Assert.That(_textMessageWriter.ToString(), Is.EqualTo(" [TEST] test1........... Passed 0.030s\r\n")); }
public void WriteTestIgnored_ShouldOutputTestIgnoredAndFinishedMessage() { _subject = new TestLogger(0,"test1"); var message = "kaboom"; _subject.WriteTestIgnored(message); var output = String.Format(" [TEST] test1................. Ignored\r\n"); Assert.That(_textMessageWriter.ToString(), Is.EqualTo(output)); }
public void WriteTestFailed_ShouldOutputTestFailedAndFinishedMessage() { _subject = new TestLogger(0,"test1"); var message = "kaboom"; var details = "stack trace"; _subject.WriteTestFailed(message, details); var output = String.Format(" [TEST] test1.................. Failed\r\n [Details] kaboom\r\n [StackTrace] stack trace\r\n"); Assert.That(_textMessageWriter.ToString(), Is.EqualTo(output)); }
public void WriteMessage_ShouldNotAddDotsIfMessageIsTooLong() { _subject = new TestLogger(0, ""); _subject.WriteMessage("thisIsReallyLongTestName", "Passed 0.030s"); Assert.That(_textMessageWriter.ToString(), Is.EqualTo(" [TEST] thisIsReallyLongTestName Passe\r\n d 0.030s\r\n")); }
public void WriteMessage_ShouldNotAddDotsIfMessageIsTooLong() { _subject = new TestLogger(0, ""); _subject.WriteMessage("thisIsReallyLongTestName", "Passed 0.030s"); Assert.That(_textMessageWriter.ToString(), Is.EqualTo(" [TEST] thisIsReallyLongTestName Passe\r\n d 0.030s\r\n")); }