Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 9aeaee6d authored by Markus QUARITSCH's avatar Markus QUARITSCH
Browse files

adding testcase for validating component xml

parent 78186375
No related branches found
No related tags found
No related merge requests found
......@@ -498,5 +498,21 @@ namespace VectoHashingTest
{
AssertHelper.Exception<ArgumentOutOfRangeException>(() => ((VectoComponents)9999).HashIdPrefix());
}
[TestCase(@"Testdata\XML\Validation\vecto_engine_valid.xml"),
TestCase(@"Testdata\XML\Validation\vecto_gearbox_valid.xml")]
public void TestXMLComponentValidation(string file)
{
var xmlDoc = new XmlDocument();
xmlDoc.Load(XmlReader.Create(file));
var validator = new XMLValidator(xmlDoc);
Assert.IsTrue(validator.ValidateXML(XmlDocumentType.DeclarationComponentData | XmlDocumentType.DeclarationJobData | XmlDocumentType.CustomerReport | XmlDocumentType.ManufacturerReport));
var version = XMLHelper.GetVersionFromNamespaceUri(xmlDoc.DocumentElement.NamespaceURI);
Assert.AreEqual("1.0", version);
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment