Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 3b033639 authored by Harald Martini's avatar Harald Martini
Browse files

updated validate and print in testcases to ensure printing of the report if an error occured

parent 8fb2817c
No related branches found
No related tags found
No related merge requests found
......@@ -88,17 +88,24 @@ namespace TUGraz.VectoCore.Tests.XML.Reports
protected bool ValidateAndPrint(XDocument document)
{
var error = false;
var schemas = XmlSchemaSet(
(Path.GetFullPath("../../../VectoCore/Resources/XSD/VectoOutputManufacturer.0.9.xsd"), "urn:tugraz:ivt:VectoAPI:DeclarationOutput:v0.9"),
(Path.GetFullPath("../../../VectoCore/Resources/XSD/VectoOutputCustomer.0.9.xsd"), "urn:tugraz:ivt:VectoAPI:CustomerOutput:v0.9"));
document.Validate(schemas, (sender, args) => {
error = true;
TestContext.WriteLine(sender.ToString());
TestContext.WriteLine(args.Message);
});
TestContext.WriteLine(document);
try {
var schemas = XmlSchemaSet(
(Path.GetFullPath("../../../../VectoCore/Resources/XSD/VectoOutputManufacturer.0.9.xsd"),
"urn:tugraz:ivt:VectoAPI:DeclarationOutput:v0.9"),
(Path.GetFullPath("../../../../VectoCore/Resources/XSD/VectoOutputCustomer.0.9.xsd"),
"urn:tugraz:ivt:VectoAPI:CustomerOutput:v0.9"));
document.Validate(schemas, (sender, args) => {
error = true;
TestContext.WriteLine(sender.ToString());
TestContext.WriteLine(args.Message);
});
} finally {
TestContext.WriteLine(document);
}
return !error;
}
......
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