Beispiel #1
0
        public void TotalAssertionsFailed_should_count_failed_tests()
        {
            // given
            var builder = new TestFileResultsBuilder()
                          .New().AddPositiveVerify().Add()
                          .New().AddPositiveVerify(false).Add()
                          .New().AddNegativeVerify(false).Add();

            var testFileResult = new TestFileResult();

            testFileResult.TestResults = builder.GetCollection();

            // when + then
            Assert.That(testFileResult.TotalAssertionsFailed, Is.EqualTo(2));
        }
Beispiel #2
0
        public void TotalTestsPassed_should_count_passed_tests()
        {
            // given
            var builder = new TestFileResultsBuilder()
                          .New().WithSuccess().Add()
                          .New().WithSuccess().Add()
                          .New().WithSuccess().Add()
                          .New().WithFail().Add()
                          .New().WithFail().Add();

            var testFileResult = new TestFileResult();

            testFileResult.TestResults = builder.GetCollection();

            // when + then
            Assert.That(testFileResult.TotalTestsPassed, Is.EqualTo(3));
        }