Esempio n. 1
0
        public void TestGetDocumentValueWithInvalidXPath()
        {
            // Arrange
            var r = new HttpResponse
            {
                ContentType = "text/xml",
                Contents = "<root><child>a</child></root>",
            };

            // Act & Assert
            r.GetDocumentValue("//(root", null);
        }
Esempio n. 2
0
        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);
        }