diff --git a/Vecto3GUI2020Test/Vecto3GUI2020Test.csproj b/Vecto3GUI2020Test/Vecto3GUI2020Test.csproj index f675c034a5fdef661777527391c2854a5a4e0fa3..9782eba6372a74f6a9f00ef657c7eea465508c7a 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 7782639ecea20edb0c575425dce50fe1878abec8..e9fba680e21845f8a4ea1b1a54222efa7646b911 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 211bfb6838ea9ba53588102a218a68cc569269ac..396786f0a9c5154229ebb588085bebd6f92b3b22 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;