From 7e3deaa2a44cfba0331b317e476ce6a9a3e6bb5b Mon Sep 17 00:00:00 2001 From: "harald.martini@student.tugraz.at" <harald.martini@student.tugraz.at> Date: Wed, 7 Jul 2021 14:02:48 +0200 Subject: [PATCH] updated vif test --- Vecto3GUI2020Test/Vecto3GUI2020Test.csproj | 3 +++ Vecto3GUI2020Test/ViewModelTests/VIFTests.cs | 18 +++++++++++++----- .../ViewModelTests/ViewModelTestBase.cs | 1 + 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Vecto3GUI2020Test/Vecto3GUI2020Test.csproj b/Vecto3GUI2020Test/Vecto3GUI2020Test.csproj index f675c034a5..9782eba637 100644 --- a/Vecto3GUI2020Test/Vecto3GUI2020Test.csproj +++ b/Vecto3GUI2020Test/Vecto3GUI2020Test.csproj @@ -43,6 +43,9 @@ <Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersionMultistage.0.1\AirdragLoadTestFile.xml" Link="Testdata\AirdragLoadTestFile.xml"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> + <Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersionMultistage.0.1\AirdragLoadTestFilev2.xml" Link="Testdata\AirdragLoadTestFilev2.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> <Content Include="..\VectoCore\VectoCoreTest\TestData\XML\XMLReaderDeclaration\SchemaVersionMultistage.0.1\vecto_multistage_consolidated_multiple_stages.xml" Link="Testdata\vecto_multistage_consolidated_multiple_stages.xml"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> diff --git a/Vecto3GUI2020Test/ViewModelTests/VIFTests.cs b/Vecto3GUI2020Test/ViewModelTests/VIFTests.cs index 7782639ece..e9fba680e2 100644 --- a/Vecto3GUI2020Test/ViewModelTests/VIFTests.cs +++ b/Vecto3GUI2020Test/ViewModelTests/VIFTests.cs @@ -73,9 +73,10 @@ namespace Vecto3GUI2020Test.ViewModelTests } - [TestCase(true, TestName="With Airdrag Component")] - [TestCase(false, TestName="Without Airdrag Component")] - public void CreateCompletedFinalVIFWidthAirdrag(bool loadAirdrag) + [TestCase(true, 1, TestName="With Airdrag Component v1")] + [TestCase(true, 2, TestName="With Airdrag Component v2")] + [TestCase(false, 0, TestName="Without Airdrag Component")] + public void CreateCompletedFinalVIFWithAirdrag(bool loadAirdrag, int airdragVersion) { var multistagevm = loadFile(_finalVifReport4); @@ -85,12 +86,19 @@ namespace Vecto3GUI2020Test.ViewModelTests VehicleViewModel.ManufacturerAddress = "Manufacturer Address"; VehicleViewModel.VIN = "1234567"; VehicleViewModel.Model = "asdf"; - VehicleViewModel.AirdragModifiedEnum = AIRDRAGMODIFIED.FALSE; + VehicleViewModel.AirdragModifiedEnum = loadAirdrag ? AIRDRAGMODIFIED.TRUE: AIRDRAGMODIFIED.FALSE; VehicleViewModel.VehicleDeclarationType = VehicleDeclarationType.final; + //SETADAS + VehicleViewModel.EngineStopStartNullable = true; + VehicleViewModel.EcoRollTypeNullable = EcoRollType.WithEngineStop; + VehicleViewModel.PredictiveCruiseControlNullable = PredictiveCruiseControlType.Option_1_2_3; + VehicleViewModel.ATEcoRollReleaseLockupClutch = false; + if (loadAirdrag) { - Assert.IsTrue(VehicleViewModel.MultistageAirdragViewModel.LoadAirdragFile(GetFullPath(airdragLoadTestFile))); + var airdragTestFile = airdragVersion == 2 ? airdragLoadTestFilev2 : airdragLoadTestFile; + Assert.IsTrue(VehicleViewModel.MultistageAirdragViewModel.LoadAirdragFile(GetFullPath(airdragTestFile))); } var resultFile = multistagevm.MultiStageJobViewModel.SaveVif(GetFullPath( diff --git a/Vecto3GUI2020Test/ViewModelTests/ViewModelTestBase.cs b/Vecto3GUI2020Test/ViewModelTests/ViewModelTestBase.cs index 211bfb6838..396786f0a9 100644 --- a/Vecto3GUI2020Test/ViewModelTests/ViewModelTestBase.cs +++ b/Vecto3GUI2020Test/ViewModelTests/ViewModelTestBase.cs @@ -26,6 +26,7 @@ namespace Vecto3GUI2020Test protected const string exempted = "exempted_primary_heavyBus.VIF.xml"; protected const string stageInputFullSample = "vecto_vehicle-stage_input_full-sample.xml"; protected const string airdragLoadTestFile = "AirdragLoadTestFile.xml"; + protected const string airdragLoadTestFilev2 = "AirdragLoadTestFilev2.xml"; //protected IXMLInputDataReader xmlInputReader; protected IKernel _kernel; -- GitLab