public void Comments() { const string pre = @"<root><!--COMMENT--><!--COMMENT--></root>"; const string post = @"<root><!--" + Guid + "--><!--" + Guid + "--></root>"; const string xpath = "//comment()"; var task = new DerivedSetGuid(); Run(pre, post, xpath, task); }
public void ElementWithoutChildNodes() { const string pre = @"<root></root>"; const string post = @"<root>" + Guid + "</root>"; const string xpath = "root"; var task = new DerivedSetGuid(); Run(pre, post, xpath, task); }
public void CDataSections() { const string pre = @"<root><![CDATA[text]]></root>"; const string post = @"<root><![CDATA[" + Guid + "]]></root>"; const string xpath = "//text()"; var task = new DerivedSetGuid(); Run(pre, post, xpath, task); }
public void Attributes() { const string pre = @"<root a="""" b="""" c=""""></root>"; var post = string.Format("<root a=\"{0}\" b=\"{0}\" c=\"{0}\"></root>", Guid); const string xpath = "//@*"; var task = new DerivedSetGuid(); Run(pre, post, xpath, task); }
public void Attribute() { const string pre = @"<root attribute=""""></root>"; var post = string.Format("<root attribute=\"{0}\"></root>", Guid); const string xpath = "root/@attribute"; var task = new DerivedSetGuid(); Run(pre, post, xpath, task); }
public void NormalText() { const string pre = @"<root></root>"; const string post = @"<root>" + Guid + "</root>"; const string xpath = "root"; var task = new DerivedSetGuid(); Run(pre, post, xpath, task); }
public void TextNodes() { const string pre = @"<root>text</root>"; const string post = @"<root>" + Guid + "</root>"; const string xpath = "//text()"; var task = new DerivedSetGuid(); Run(pre, post, xpath, task); }
public void ProcessingInstructions() { const string pre = @"<root><?foo bar?><?foo bar?></root>"; const string post = @"<root><?foo " + Guid + "?><?foo " + Guid + "?></root>"; const string xpath = "//processing-instruction()"; var task = new DerivedSetGuid(); Run(pre, post, xpath, task); }