public void TestNameComesFromConstructor() { const string name = "mytest"; var sut = new SuccessResult(name); Assert.AreEqual(name, sut.TestName); }
public void PassedIsTrueNullWhenNoFailureOrPending() { var success1 = new SuccessResult("good"); var success2 = new SuccessResult("good"); var success3 = new SuccessResult("good"); var sut = new ResultCollection(); sut.Add(success1); sut.Add(success2); sut.Add(success3); Assert.IsTrue(sut.Passed.Value); }
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 PassedIsFalsNullWhenPendingResultExistsWithNoFailures() { var success1 = new SuccessResult("good"); var success2 = new SuccessResult("good"); var success3 = new SuccessResult("good"); var pending = new PendingResult("pending"); var sut = new ResultCollection(); sut.Add(success1); sut.Add(success2); sut.Add(pending); sut.Add(success3); Assert.IsNull(sut.Passed); }
public void WasSuccessfuIsTrue() { var sut = new SuccessResult("mytest"); Assert.IsTrue(sut.WasSuccess.Value); }
public void MessageIsPassed() { var sut = new SuccessResult("mytest"); Assert.AreEqual("Passed", sut.Message); }
public void DetailedMessageIsEmpty() { var sut = new SuccessResult("mytest"); Assert.AreEqual(string.Empty, sut.DetailedMessage); }