示例#1
0
        /// <summary>
        /// Appends a child test to the current test
        /// </summary>
        /// <param name="Node">Child node</param>
        /// <returns>ExtentTest</returns>
        public ExtentTest AppendChild(ExtentTest Node)
        {
            Node.GetTest().EndedTime   = DateTime.Now;
            Node.GetTest().IsChildNode = true;
            Node.GetTest().TrackLastRunStatus();

            test.HasChildNodes = true;

            IEnumerable <string> testCats = test.CategoryList
                                            .Select(attr => attr.GetName())
                                            .Distinct();
            IEnumerable <string> cats = Node.GetTest().CategoryList
                                        .Select(attr => attr.GetName())
                                        .Distinct();

            cats.ToList().ForEach(c => {
                if (!testCats.Contains(c))
                {
                    test.CategoryList.Add(new Category(c));
                }
            });

            test.NodeList.Add(Node.GetTest());

            return(this);
        }
示例#2
0
        public void EndTest(ExtentTest Test)
        {
            Test.GetTest().Ended = true;

            AddTest(Test.GetTest());

            RemoveChildTests();
        }
示例#3
0
        /// <summary>
        /// Ends the current test
        /// </summary>
        ///
        /// <param name="Test">The ExtentTest object that is coming to an end</param>
        public void EndTest(ExtentTest Test)
        {
            Test.GetTest().Ended = true;

            AddTest(Test.GetTest());

            RemoveChildTests();
        }
示例#4
0
        /// <summary>
        /// Appends a child test to the current test
        /// </summary>
        ///
        /// <param name="Node">An <code>ExtentTest</code> object. Test that is added as the node</param>
        /// <returns>An <code>ExtentTest</code> object, which is the test that adds the child node</returns>
        public ExtentTest AppendChild(ExtentTest Node)
        {
            var node = Node.GetTest();

            node.ChildNode = true;
            node.Ended     = true;

            node.CategoryList.ForEach(c => AssignCategory(c.Name));
            node.AuthorList.ForEach(a => AssignAuthor(a.Name));

            node.PrepareFinalize();

            _test.NodeList.Add(node);
            _test.ContainsChildNodes = true;

            return(this);
        }
示例#5
0
        public ExtentTest AppendChild(ExtentTest Node)
        {
            var node = Node.GetTest();

            node.ChildNode = true;
            node.Ended = true;

            node.TrackLastRunStatus();

            node.CategoryList.ForEach(c => AssignCategory(c.Name));
            node.AuthorList.ForEach(a => AssignAuthor(a.Name));

            _test.NodeList.Add(node);
            _test.ContainsChildNodes = true;

            return this;
        }
示例#6
0
        public void EndTest(ExtentTest Test)
        {
            Test.GetTest().Ended = true;

            AddTest(Test.GetTest());
        }
示例#7
0
        /// <summary>
        /// Ends the test. Calling this method will ensure the test gets safely 
        /// added to the report.
        /// </summary>
        /// <param name="Test">ExtentTest object</param>
        public void EndTest(ExtentTest Test)
        {
            Test.GetTest().HasEnded = true;

            reportInstance.AddTest(Test.GetTest());
        }
示例#8
0
        /// <summary>
        /// Ends the test. Calling this method will ensure the test gets safely
        /// added to the report.
        /// </summary>
        /// <param name="Test">ExtentTest object</param>
        public void EndTest(ExtentTest Test)
        {
            Test.GetTest().HasEnded = true;

            reportInstance.AddTest(Test.GetTest());
        }