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

Skip to content
Snippets Groups Projects
Commit e1f3e2a3 authored by Harald MARTINI's avatar Harald MARTINI
Browse files

added exempted testcases

parent 78eb30bd
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.ComponentModel.Design;
using System.IO;
using System.IO.Compression;
using System.Xml;
using System.Xml.Linq;
using Ninject;
......@@ -464,5 +465,66 @@ namespace VectoMockupTest
Assert.IsTrue(MRF_CIF_WriterTestBase.ValidateAndPrint(XDocument.Load(fileWriter.XMLFullReportName), XsdPath), "MRF invalid");
Assert.IsTrue(MRF_CIF_WriterTestBase.ValidateAndPrint(XDocument.Load(fileWriter.XMLCustomerReportName), XsdPath), "CIF invalid");
}
[TestCase("TestData/XML/XMLReaderDeclaration/SchemaVersion2.4/Distributed/ExemptedVehicles/exempted_completedBus_input_full.xml",
true,
true,
false,
false,
true,
TestName="ExemptedCompletedBus1")]
[TestCase("TestData/XML/XMLReaderDeclaration/SchemaVersion2.4/Distributed/ExemptedVehicles/exempted_completedBus_input_only_mandatory_entries.xml",
true,
true,
false,
false,
false,
TestName="ExemptedCompletedBus1")]
[TestCase("TestData/XML/XMLReaderDeclaration/SchemaVersion2.4/Distributed/ExemptedVehicles/exempted_heavyLorry.xml",
false,
false,
true,
false,
false,
TestName="ExemptedHeavyLorry")]
[TestCase("TestData/XML/XMLReaderDeclaration/SchemaVersion2.4/Distributed/ExemptedVehicles/exempted_mediumLorry.xml",
false,
true,
true,
false,
false,
TestName="ExemptedMediumLorry")]
[TestCase("TestData/XML/XMLReaderDeclaration/SchemaVersion2.4/Distributed/ExemptedVehicles/exempted_primaryBus.xml",
false,
false,
true,
false,
true,
TestName="ExemptedPrimaryBus")]
public void ExemptedTest(string fileName, bool checkVif, bool checkCif, bool checkMrf, bool checkPrimaryMrf,
bool checkPrimaryReport)
{
var inputProvider = _inputDataReader.Create(fileName);
var fileWriter = GetOutputFileWriter(TestContext.CurrentContext.Test.Name, fileName);
var sumWriter = new SummaryDataContainer(fileWriter);
var jobContainer = new JobContainer(sumWriter);
_simulatorFactory =
_simFactoryFactory.Factory(ExecutionMode.Declaration, inputProvider, fileWriter, null, null, true);
Clearfiles(fileWriter);
jobContainer.AddRuns(_simulatorFactory);
jobContainer.Execute(false);
jobContainer.WaitFinished();
CheckFileExists(fileWriter,
checkVif:checkVif,
checkCif:checkCif,
checkMrf:checkMrf,
checkPrimaryMrf:checkPrimaryMrf,
checkPrimaryReport:checkPrimaryReport);
if(checkMrf) Assert.IsTrue(MRF_CIF_WriterTestBase.ValidateAndPrint(XDocument.Load(fileWriter.XMLFullReportName), XsdPath), "MRF invalid");
if(checkCif) Assert.IsTrue(MRF_CIF_WriterTestBase.ValidateAndPrint(XDocument.Load(fileWriter.XMLCustomerReportName), XsdPath), "CIF invalid");
}
}
}
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