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

Skip to content
Snippets Groups Projects
Commit ad064b96 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

adding testcase for xml declaration vehicle without airdrag component

parent aa291114
No related branches found
No related tags found
No related merge requests found
source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -2546,6 +2546,9 @@
<ItemGroup>
<Content Include="TestData\XML\XMLReaderDeclaration\vecto_engine-sample.xml" />
<Content Include="TestData\XML\XMLReaderDeclaration\vecto_gearbox-sample.xml" />
<Content Include="TestData\XML\XMLReaderDeclaration\vecto_vehicle-sample_noAirdrag.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="TestData\XML\XMLReaderDeclaration\vecto_vehicle-sample.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
......
......@@ -56,11 +56,18 @@ namespace TUGraz.VectoCore.Tests.XML
public class XMLDeclarationInputTest
{
const string SampleVehicleDecl = "TestData/XML/XMLReaderDeclaration/vecto_vehicle-sample.xml";
const string SampleVehicleDeclNoAirdrag = "TestData/XML/XMLReaderDeclaration/vecto_vehicle-sample_noAirdrag.xml";
const string SampleVehicleFullDecl = "TestData/XML/XMLReaderDeclaration/vecto_vehicle-sample_FULL.xml";
const string SampleVehicleFullDeclCertificationOptions =
"TestData/XML/XMLReaderDeclaration/vecto_vehicle-sample_certificationOptions.xml";
[OneTimeSetUp]
public void Init()
{
Directory.SetCurrentDirectory(TestContext.CurrentContext.TestDirectory);
}
[TestCase]
public void TestXMLInputEng()
{
......@@ -330,6 +337,16 @@ namespace TUGraz.VectoCore.Tests.XML
Assert.AreEqual(1.0, inputDataProvider.RetarderInputData.Ratio);
}
[TestCase]
public void TestVehicleInputNoAirdrag()
{
var reader = XmlReader.Create(SampleVehicleDeclNoAirdrag);
var inputDataProvider = new XMLDeclarationInputDataProvider(reader, true);
Assert.IsNull(inputDataProvider.AirdragInputData.AirDragArea);
}
[TestCase]
public void TestXMLPowertrainGeneration()
{
......
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