public void ValidateCustomDbSchemaTest() { var doc = XDocument.Load("TestCustomDbSchema.xml"); var dbManager = new HyperDbXmlScriptProvider(); dbManager.ClearDbXmlSchemas(); dbManager.AddDbXmlSchema(null, "TestCustomDbXmlSchema.xsd"); dbManager.ValidateDbXmlDocument(doc, null, false); }
public void ValidateHyperAgainstCustomDbSchemaTest() { Exception testEx = null; try { var doc = XDocument.Load("TestHyperDbSchema.xml"); var dbManager = new HyperDbXmlScriptProvider(); dbManager.ClearDbXmlSchemas(); dbManager.AddDbXmlSchema(null, "TestCustomDbXmlSchema.xsd"); dbManager.ValidateDbXmlDocument(doc, null, false); } catch (Exception ex) { testEx = ex; } // If the expected exception was thrown, the test was successful Assert.IsNotNull(testEx); Assert.IsTrue(testEx is XmlSchemaValidationException); }