예제 #1
0
        public void ExistsReportsSchema()
        {
            // Arrange
            IXmlSchemaRegistry registry = new XmlSchemaRegistry();

            registry.RegisterSchema("test");

            // Act
            var candidate = registry.SchemaExists("test");

            // Assert
            Assert.IsTrue(candidate, "Test schema not present");
        }
예제 #2
0
        public void GetSchemasReportsAllSchemas()
        {
            // Arrange
            IXmlSchemaRegistry registry = new XmlSchemaRegistry();

            registry.RegisterSchema("test");

            // Act
            var candidate = registry.GetSchemas().ToList();

            // Assert
            Assert.IsNotNull(candidate);
            Assert.AreEqual(1, candidate.Count, "Count differs");
            Assert.AreEqual("test", candidate[0], "First element differs");
        }