diff --git a/VectoCoreTest/Models/Simulation/AuxTests.cs b/VectoCoreTest/Models/Simulation/AuxTests.cs index 480ba8b969a4096d82c26431aed6c61d462691ad..d3dd3b75dcfc7c4eeebbe92d724fbbb95e1817f8 100644 --- a/VectoCoreTest/Models/Simulation/AuxTests.cs +++ b/VectoCoreTest/Models/Simulation/AuxTests.cs @@ -14,6 +14,7 @@ * limitations under the Licence. */ +using System.Configuration; using TUGraz.VectoCore.Utils; using TUGraz.VectoCore.Exceptions; using TUGraz.VectoCore.Tests.Utils; @@ -331,14 +332,19 @@ namespace TUGraz.VectoCore.Tests.Models.Simulation [TestMethod] public void AuxDeclarationWrongConfiguration() { - // test what happens if there was a wrong auxiliary configuration in declaration mode - Assert.Inconclusive(); - } + var fileWriter = new FileOutputWriter("AuxReadJobFileDeclarationMode", ""); + var sumData = new SummaryDataContainer(fileWriter); + var jobContainer = new JobContainer(sumData); + + var inputData = JSONInputDataFactory.ReadJsonJob(@"TestData\Jobs\40t_Long_Haul_Truck_wrong_AUX.vecto"); + var runsFactory = new SimulatorFactory(ExecutionMode.Declaration, inputData, fileWriter); + + jobContainer.AddRuns(runsFactory); + jobContainer.Execute(); + + ResultFileHelper.TestSumFile(@"TestData\Results\Declaration\40t_Long_Haul_Truck.vsum", + @"AuxReadJobFileDeclarationMode.vsum"); - [TestMethod] - public void AuxCycleAdditionalFieldMissing() - { - // test the case when the Padd field is missing (no direct auxiliary) Assert.Inconclusive(); } } diff --git a/VectoCoreTest/Models/Simulation/PwheelModeTests.cs b/VectoCoreTest/Models/Simulation/PwheelModeTests.cs index fba194b82ae19e810d32fab9ec12f96182b077bb..4309901978553aba0b88fea5b180ae32673e7e76 100644 --- a/VectoCoreTest/Models/Simulation/PwheelModeTests.cs +++ b/VectoCoreTest/Models/Simulation/PwheelModeTests.cs @@ -30,10 +30,10 @@ namespace TUGraz.VectoCore.Tests.Models.Simulation [TestMethod] public void Pwheel_ReadCycle_Test() { - IVehicleContainer container = new VehicleContainer(); + var container = new VehicleContainer(); var inputData = "<t>,<Pwheel>,<Gear>,<n>,<Padd>\n1,89,2,1748,1.300\n2,120,2,1400,0.4"; - Stream cycleFile = new MemoryStream(Encoding.UTF8.GetBytes(inputData)); + var cycleFile = new MemoryStream(Encoding.UTF8.GetBytes(inputData)); var drivingCycle = DrivingCycleDataReader.ReadFromStream(cycleFile, CycleType.PWheel); var gearbox = new Gearbox(container, @@ -72,7 +72,7 @@ namespace TUGraz.VectoCore.Tests.Models.Simulation // prepare input data var inputData = "<t>,<Pwheel>,<Gear>,<n>,<Padd>\n1,89,2,1748,1.300\n2,120,2,1400,0.4"; - Stream cycleFile = new MemoryStream(Encoding.UTF8.GetBytes(inputData)); + var cycleFile = new MemoryStream(Encoding.UTF8.GetBytes(inputData)); var drivingCycle = DrivingCycleDataReader.ReadFromStream(cycleFile, CycleType.PWheel); var fuelConsumption = new DataTable(); diff --git a/VectoCoreTest/VectoCoreTest.csproj b/VectoCoreTest/VectoCoreTest.csproj index bcd9ff3cfed192f380125594fe7fb00157eb072d..cf48e297eca1ed41be2c171256927ff28758a75a 100644 --- a/VectoCoreTest/VectoCoreTest.csproj +++ b/VectoCoreTest/VectoCoreTest.csproj @@ -719,6 +719,9 @@ <None Include="TestData\Integration\FullPowerTrain\unlimited.vacc"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> + <None Include="TestData\Jobs\40t_Long_Haul_Truck_wrong_AUX.vecto"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> <None Include="TestData\Jobs\40t_Long_Haul_Truck_invalid-JSON.vecto"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None>