/// <summary>
        /// Adds the pre defined node.
        /// </summary>
        /// <param name="element">
        /// The element.
        /// </param>
        /// <param name="testSuiteNode">
        /// The test suite node.
        /// </param>
        private void AddPreDefinedNode(ProjectElement element, DTTestSuiteNode testSuiteNode)
        {
            Logger.Enter(this, this.ProjectFile, "AddPreDefinedNode");

            IEnumerable <ProjectItem> deviceFunctions = this.ProjectMgr.BuildProject.GetItems("PreDefined");

            foreach (ProjectItem df in deviceFunctions)
            {
                var deviceFunctionElement = new ProjectElement(this.ProjectMgr, df, false);

                var testsuite = deviceFunctionElement.GetMetadata("RootFolder");
                if (testsuite == element.Item.EvaluatedInclude)
                {
                    var testCaseNodetitle = deviceFunctionElement.GetMetadata("Title");
                    var compilerVariable  = deviceFunctionElement.GetMetadata("CompilerVariable");

                    var testCaseNode = new DTPreDefineNode(this, testCaseNodetitle, compilerVariable, true);
                    testSuiteNode.AddChild(testCaseNode);
                }
            }
        }
        /// <summary>
        /// Processes the folders.
        /// </summary>
        protected internal override void ProcessFolders()
        {
            Logger.Enter(this, this.ProjectFile, "ProcessFolders");

            base.ProcessFolders();

            IEnumerable <ProjectItem> deviceFunctionsFolder = this.ProjectMgr.BuildProject.GetItems("DeviceFunctionsFolder");

            foreach (ProjectItem deviceFunctionFolder in deviceFunctionsFolder)
            {
                var element = new ProjectElement(this.ProjectMgr, deviceFunctionFolder, false);

                var title         = element.GetMetadata("Title");
                var testSuiteNode = new DTTestSuiteNode(this, title);
                this.AddChild(testSuiteNode);

                this.AddDeviceFunctionNode(element, testSuiteNode);

                this.AddPreDefinedNode(element, testSuiteNode);
            }
        }
        /// <summary>
        /// Adds the device function node.
        /// </summary>
        /// <param name="element">
        /// The element.
        /// </param>
        /// <param name="testSuiteNode">
        /// The test suite node.
        /// </param>
        private void AddDeviceFunctionNode(ProjectElement element, DTTestSuiteNode testSuiteNode)
        {
            Logger.Enter(this, this.ProjectFile, "AddDeviceFunctionNode");

            if (element.Item.EvaluatedInclude == "DeviceFunctions")
            {
                if (this.EHDataManager != null && this.EHDataManager.DTMstudioTestData != null && this.EHDataManager.DTMstudioTestData.DeviceTypeProject != null && this.EHDataManager.DTMstudioTestData.DeviceTypeProject.DeviceFunctions != null && this.EHDataManager.TestFrameworkManager != null && this.EHDataManager.DTMstudioTestData != null && this.EHDataManager.DTMstudioTestData.TestLibrary != null && this.EHDataManager.DTMstudioTestData.TestLibrary.DeviceFunctions != null && this.EHDataManager.TestFrameworkManager.DeviceFunctionMappingList != null)
                {
                    foreach (var dtmStudioDeviceFunction in
                             this.EHDataManager.DTMstudioTestData.DeviceTypeProject.DeviceFunctions.Where(dtmStudioDeviceFunction => dtmStudioDeviceFunction.Active))
                    {
                        var deviceFunctionMapping = this.EHDataManager.GetDeviceFunctionMappingFromTestFramework(dtmStudioDeviceFunction);

                        if (deviceFunctionMapping != null)
                        {
                            var testCaseNode = new DTDeviceFunctionNode(this, deviceFunctionMapping.DisplayName, dtmStudioDeviceFunction.Name, true);

                            testSuiteNode.AddChild(testCaseNode);
                        }
                    }
                }
            }
        }