/** * Set the query on each V1ProjectMap */ private void SetQueryOnNode(V1ProjectMap projectNode, string baseFilter) { var filter = projectNode.IncludeChildren ? string.Format("{0};Scope.ParentMeAndUp.Name='{1}'", baseFilter, projectNode.ProjectName) : string.Format("{0};Scope.Name='{1}'", baseFilter, projectNode.ProjectName); projectNode.Query = new Query(TestType); projectNode.Query.Selection.Add(TestNameDef); projectNode.Query.Selection.Add(TestDescriptionDef); projectNode.Query.Selection.Add(TestProjectDef); projectNode.Query.Selection.Add(TestDisplayIdDef); projectNode.Query.Filter = new QueryFilterTerm(filter); }
/** * Load nodes defined the <TestPublishProjectMap> element */ private void LoadProjectMap(XmlNode mapElement, XmlNode filterElement) { var baseFilter = filterElement.InnerText; var v1ProjectNodes = mapElement.SelectNodes("V1Project"); if(v1ProjectNodes != null) { foreach(XmlNode oneNode in v1ProjectNodes) { var v1ProjectMap = new V1ProjectMap(oneNode); Logger.Log(LogMessage.SeverityType.Debug, string.Format("Maping V1Project {0} to QC Project {1}", v1ProjectMap.ProjectName, v1ProjectMap.DestinationProject)); SetQueryOnNode(v1ProjectMap, baseFilter); Logger.Log(LogMessage.SeverityType.Debug, string.Format("\tQuery is {0}", v1ProjectMap.Query.Filter.Token)); projectMaps.Add(v1ProjectMap); } } }