Esempio n. 1
0
        public void TestNameComesFromConstructor()
        {
            const string name = "mytest";
            var sut = new SuccessResult(name);

            Assert.AreEqual(name, sut.TestName);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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);
        }
Esempio n. 5
0
        public void WasSuccessfuIsTrue()
        {
            var sut = new SuccessResult("mytest");

            Assert.IsTrue(sut.WasSuccess.Value);
        }
Esempio n. 6
0
        public void MessageIsPassed()
        {
            var sut = new SuccessResult("mytest");

            Assert.AreEqual("Passed", sut.Message);
        }
Esempio n. 7
0
        public void DetailedMessageIsEmpty()
        {
            var sut = new SuccessResult("mytest");

            Assert.AreEqual(string.Empty, sut.DetailedMessage);
        }