Пример #1
0
        public void Reset_should_set_passed_to_zero()
        {
            var testStatistics = new TestStatistics();
            testStatistics.Handle(GetTestStepFinished(TestStatus.Passed));

            testStatistics.Handle(new TestsReset());

            Assert.AreEqual(0, testStatistics.Passed.Value);
        }
Пример #2
0
        public void Reset_should_set_failed_to_zero()
        {
            var testStatistics = new TestStatistics();

            testStatistics.Handle(GetTestStepFinished(TestStatus.Failed));

            testStatistics.Handle(new TestsReset());

            Assert.AreEqual(0, testStatistics.Failed.Value);
        }
Пример #3
0
        public void Reset_should_set_inconclusive_to_zero()
        {
            var testStatistics = new TestStatistics();

            testStatistics.Handle(GetTestStepFinished(TestStatus.Skipped));

            testStatistics.Handle(new TestsReset());

            Assert.AreEqual(0, testStatistics.Inconclusive.Value);
        }
Пример #4
0
        public void Inconclusive_should_be_incremented_if_completed_test_step_was_inconclusive()
        {
            var testStatistics = new TestStatistics();

            testStatistics.Handle(GetTestStepFinished(TestStatus.Inconclusive));

            Assert.AreEqual(1, testStatistics.Inconclusive.Value);
        }
Пример #5
0
        public void Skipped_should_be_incremented_if_completed_test_step_was_skipped()
        {
            var testStatistics = new TestStatistics();

            testStatistics.Handle(GetTestStepFinished(TestStatus.Skipped));

            Assert.AreEqual(1, testStatistics.Skipped.Value);
        }
Пример #6
0
        public void Inconclusive_should_be_incremented_if_completed_test_step_was_inconclusive()
        {
            var testStatistics = new TestStatistics();

            testStatistics.Handle(GetTestStepFinished(TestStatus.Inconclusive));

            Assert.AreEqual(1, testStatistics.Inconclusive.Value);
        }
Пример #7
0
        public void Skipped_should_be_incremented_if_completed_test_step_was_skipped()
        {
            var testStatistics = new TestStatistics();

            testStatistics.Handle(GetTestStepFinished(TestStatus.Skipped));

            Assert.AreEqual(1, testStatistics.Skipped.Value);
        }
Пример #8
0
        public void Count_should_not_be_updated_if_completed_test_step_is_not_test_case()
        {
            var testStatistics = new TestStatistics();
            var testStepRun    = new TestStepRun(new TestStepData("id", "name", "fullName", "testId"))
            {
                Result = new TestResult(new TestOutcome(TestStatus.Passed))
            };

            testStatistics.Handle(new TestStepFinished(null, testStepRun));

            Assert.AreEqual(0, testStatistics.Passed.Value);
        }
Пример #9
0
        public void Count_should_not_be_updated_if_completed_test_step_is_not_test_case()
        {
            var testStatistics = new TestStatistics();
            var testStepRun = new TestStepRun(new TestStepData("id", "name", "fullName", "testId"))
            {
                Result = new TestResult(new TestOutcome(TestStatus.Passed))
            };

            testStatistics.Handle(new TestStepFinished(null, testStepRun));

            Assert.AreEqual(0, testStatistics.Passed.Value);
        }
Пример #10
0
        public void Reset_should_set_inconclusive_to_zero()
        {
            var testStatistics = new TestStatistics();
            testStatistics.Handle(GetTestStepFinished(TestStatus.Skipped));

            testStatistics.Handle(new TestsReset());

            Assert.AreEqual(0, testStatistics.Inconclusive.Value);
        }