예제 #1
0
        public void TestAssertWithInvalidXsd()
        {
            // Arrange
            const string ActualHtml =
              @"<Shop>
                    <Item>a</Item>
                    <Item>b</Item>
                    <Item>c</Item>
                </Shop>";

            var item = new XsdAssertion
            {
                Xsd =
                    @"<?xml version='1.0' encoding='utf-8'?>
                        <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>
                          <xs:element name='Shop'>
                            <xs:complexType>
                              <xs:sequence>"
            };

            var actual = new Arrange { HttpResponse = new HttpResponse { Contents = ActualHtml, ContentType = "text/xml" } };

            // Act
            item.Assert(null, actual);

            // Assert
            Assert.IsFalse(item.Success);
        }
예제 #2
0
        public void TestName()
        {
            // Arrange
            var item = new XsdAssertion();

            // Act & Assert
            Assert.AreEqual("Xsd", item.Name);
        }