Beispiel #1
0
        public void It_should_delegate_NotifyStepFinished()
        {
            var step = new TestResults.TestStepResult();

            _subject.NotifyStepFinished(step);
            foreach (var notifier in _notifiers)
            {
                Mock.Get(notifier).Verify(n => n.NotifyStepFinished(step));
            }
        }
        public void It_should_return_all_steps_for_step_in_order()
        {
            var step = new TestResults.TestStepResult
            {
                StatusDetails = "root",
                SubSteps      = new[]
                {
                    new TestResults.TestStepResult {
                        StatusDetails = "a"
                    },
                    new TestResults.TestStepResult {
                        StatusDetails = "b", SubSteps = new [] { new TestResults.TestStepResult {
                                                                     StatusDetails = "b1"
                                                                 } }
                    },
                    new TestResults.TestStepResult
                    {
                        StatusDetails = "c",
                        SubSteps      = new[]
                        {
                            new TestResults.TestStepResult
                            {
                                StatusDetails = "c1",
                                SubSteps      = new[] { new TestResults.TestStepResult {
                                                            StatusDetails = "c11"
                                                        } }
                            },
                            new TestResults.TestStepResult
                            {
                                StatusDetails = "c2",
                                SubSteps      = new[] { new TestResults.TestStepResult {
                                                            StatusDetails = "c21"
                                                        } }
                            }
                        }
                    }
                }
            };

            Assert.AreEqual(new[] { "root", "a", "b", "b1", "c", "c1", "c11", "c2", "c21" }, step.GetAllSteps().Select(x => x.StatusDetails).ToArray());
        }