/// <summary> /// Generates the close template section constraints for a particular template /// </summary> /// <param name="aClosedTemplate"></param> /// <returns>xpath test for assertion</returns> public string GenerateClosedTemplateConstraints(Template aClosedTemplate) { List <string> xpaths = new List <string>(); xpaths.Add(GenerateClosedTemplateIdentifierXpath(aClosedTemplate.Oid)); if (aClosedTemplate.ImpliedTemplate != null) { xpaths.Add(GenerateClosedTemplateIdentifierXpath(aClosedTemplate.ImpliedTemplate.Oid)); } var childOids = TemplateUtil.GetAllChildTemplateOids(aClosedTemplate); foreach (var oid in childOids) { xpaths.Add(GenerateClosedTemplateIdentifierXpath(oid)); } if (xpaths.Count > 0) { return(string.Format(this.igTypePlugin.ClosedTemplateXpath, this.schemaPrefix, string.Join(" and ", xpaths))); } return(null); }