public void LoadBadXMLFileWithSchema() { using (System.IO.StreamWriter xmlBadFile = new System.IO.StreamWriter(XmlFileNameBad)) { xmlBadFile.WriteLine(XmlDocBad); } cXMLHandler handler = new cXMLHandler(); string schema = handler.LoadSchemaFromFile(XsdFileName); string badDoc = handler.LoadXMLFileToString(XmlFileNameBad); }
public void LoadGoodXMLFileWithSchema() { cXMLHandler handler = new cXMLHandler(); string schema = handler.LoadSchemaFromFile(XsdFileName); string goodDoc = handler.LoadXMLFileToString(XmlFileNameGood); List<string> warnings = handler.GetWarnings(); Assert.IsTrue(warnings.Count == 0); }
public void SaveGoodValidatedStringAsXMLFile() { cXMLHandler handler = new cXMLHandler(); string schema = handler.LoadSchemaFromFile(XsdFileName); handler.SaveStringAsXMLFile(XmlFileNameGoodValidatedSave, XmlDocGood); }
public void SaveBadValidatedStringAsXMLFile() { if (File.Exists(XmlFileNameBadValidation)) { File.Delete(XmlFileNameBadValidation); } cXMLHandler handler = new cXMLHandler(); string schema = handler.LoadSchemaFromFile(XsdFileName); handler.SaveStringAsXMLFile(XmlFileNameBadValidation, XmlDocBad); if (File.Exists(XmlFileNameBadValidation)) { File.Delete(XmlFileNameBadValidation); } }