Пример #1
0
        private TestStepRunNode BuildFakeTree()
        {
            // Root
            //   +- Child1
            //   +- Child2
            //   +- Child3
            //       +- Child31
            //       +- Child32
            //           +- Child321
            //           +- Child322
            //           +- Child323
            //           +- Child324
            //       +- Child33
            //           +- Child331
            //           +- Child332
            //           +- Child333

            var child1   = CreateFakeTestStepRun("1", true, TestOutcome.Passed);
            var child2   = CreateFakeTestStepRun("2", true, TestOutcome.Passed);
            var child331 = CreateFakeTestStepRun("331", true, TestOutcome.Passed);
            var child332 = CreateFakeTestStepRun("332", true, TestOutcome.Pending);
            var child333 = CreateFakeTestStepRun("333", true, TestOutcome.Passed);
            var child33  = CreateFakeTestStepRun("33", false, TestOutcome.Passed, child331, child332, child333);
            var child321 = CreateFakeTestStepRun("321", true, TestOutcome.Inconclusive);
            var child322 = CreateFakeTestStepRun("322", true, TestOutcome.Passed);
            var child323 = CreateFakeTestStepRun("323", true, TestOutcome.Failed);
            var child324 = CreateFakeTestStepRun("324", true, TestOutcome.Ignored);
            var child32  = CreateFakeTestStepRun("32", false, TestOutcome.Failed, child321, child322, child323, child324);
            var child31  = CreateFakeTestStepRun("31", true, TestOutcome.Passed);
            var child3   = CreateFakeTestStepRun("3", false, TestOutcome.Failed, child31, child32, child33);
            var root     = CreateFakeTestStepRun("Root", false, TestOutcome.Failed, child1, child2, child3);

            return(TestStepRunNode.BuildTreeFromRoot(root));
        }
Пример #2
0
        public void BuildTreeFromRoot_with_null_root()
        {
            var tree = TestStepRunNode.BuildTreeFromRoot(null);

            Assert.AreEqual(1, tree.Count);
        }