From f4f557e2049f7f14224d6eeed9340f32d71e071d Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Thu, 30 Nov 2017 10:50:18 +0100 Subject: [PATCH] adding testcase to reproduce error: no certification number for tyres in xml report --- VectoCore/VectoCoreTest/Integration/XMLReportTest.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/VectoCore/VectoCoreTest/Integration/XMLReportTest.cs b/VectoCore/VectoCoreTest/Integration/XMLReportTest.cs index 6f2f9353b7..16efba12c1 100644 --- a/VectoCore/VectoCoreTest/Integration/XMLReportTest.cs +++ b/VectoCore/VectoCoreTest/Integration/XMLReportTest.cs @@ -30,6 +30,7 @@ */ using System.IO; +using System.Linq; using System.Xml; using System.Xml.XPath; using NUnit.Framework; @@ -78,6 +79,13 @@ namespace TUGraz.VectoCore.Tests.Integration var manufacturerReport = xmlReport.FullReport; Assert.AreEqual(5, manufacturerReport.XPathSelectElement("//*[local-name()='VehicleGroup']").Value.ToInt()); + + var reportWheels = manufacturerReport.XPathSelectElements("//*[local-name()='TyreCertificationNumber']").ToList(); + var i = 0; + Assert.AreEqual(dataProvider.JobInputData.Vehicle.Axles.Count, reportWheels.Count); + foreach (var axleDeclarationInputData in dataProvider.JobInputData.Vehicle.Axles) { + Assert.AreEqual(axleDeclarationInputData.Tyre.CertificationNumber, reportWheels[i++].Value); + } } } } -- GitLab