public void TestGetDocumentValueWithInvalidXPath() { // Arrange var r = new HttpResponse { ContentType = "text/xml", Contents = "<root><child>a</child></root>", }; // Act & Assert r.GetDocumentValue("//(root", null); }
public void TestGetDocumentValue() { // Arrange var r = new HttpResponse { ContentType = "text/xml", Contents = "<root><child>a</child></root>", }; // Act var result = r.GetDocumentValue("root/child", null); // Assert Assert.AreEqual("a", result); }