コード例 #1
0
        /// <summary>
        /// return the root nurse object
        /// </summary>
        /// <param name="treeView"></param>
        /// <param name="rootTestObject"></param>
        /// <returns>return root nurse, which does not contain test object</returns>
        internal static TestObjectNurse AddTree(TreeView treeView, ITestObject testObject)
        {
            TestObjectNurse rootNurse = TestObjectNurse.FromTree(treeView);

            TestObjectNurse nurse = rootNurse.AddDecendants(testObject);

            return(rootNurse);
        }
コード例 #2
0
        public static TestObjectNurse ConvertSubtree(UIATestObject topTestObject)
        {
            TestObjectNurse nurse = new TestObjectNurse(topTestObject);

            foreach (ITestObject childTestObject in topTestObject.Children)
            {
                nurse.AddDecendants(childTestObject);
            }
            return(nurse);
        }
コード例 #3
0
        /// <summary>
        /// Add testObjects subtree to the current nurse node.
        /// </summary>
        /// <param name="testObject"></param>
        /// <returns></returns>
        internal TestObjectNurse AddDecendants(ITestObject testObject)
        {
            TestObjectNurse nurse = this.AddChild(testObject) as TestObjectNurse;

            foreach (ITestObject childTestObject in testObject.Children)
            {
                nurse.AddDecendants(childTestObject);
            }
            return(nurse);
        }