public void MessageIsExceptionMessage() { const string exceptionMessage = "this is bad."; var sut = new FailureResult(TEST_NAME, new Exception(exceptionMessage)); Assert.AreEqual("Failed", sut.Message); }
public void DetailedMessageIsExceptionStackTrace() { const string stacktrace = "some stack trace error of code issues"; var exception = new TestException("msg", stacktrace); var sut = new FailureResult(TEST_NAME, exception); Assert.AreEqual(exception.Message, sut.DetailedMessage); }
public void PassedIsFalseWhenAnyFailureResultsExists() { var success = new SuccessResult("good"); var pending = new PendingResult("pending"); var failure = new FailureResult("bad", new Exception("djsfdsf")); var sut = new ResultCollection(); sut.Add(success); sut.Add(pending); sut.Add(failure); Assert.IsFalse(sut.Passed.Value); }
public void WasSuccessfuIsFalse() { var sut = new FailureResult(TEST_NAME, new Exception()); Assert.IsFalse(sut.WasSuccess.Value); }
public void TestNameComesFromConstructor() { var sut = new FailureResult(TEST_NAME, new Exception()); Assert.AreEqual(TEST_NAME, sut.TestName); }