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

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

correct testcase to compare loss map entry-wise,

correct testcase to compare driver data with bus-specific values
parent 5861673e
No related branches found
No related tags found
No related merge requests found
...@@ -458,7 +458,11 @@ namespace TUGraz.VectoCore.Tests.Integration.CompletedBus ...@@ -458,7 +458,11 @@ namespace TUGraz.VectoCore.Tests.Integration.CompletedBus
Assert.IsNotNull(genericAxlegearData.AxleGear.LossMap); Assert.IsNotNull(genericAxlegearData.AxleGear.LossMap);
AssertAxlegearLossMap(genericAxlegearData.AxleGear.LossMap); AssertAxlegearLossMap(genericAxlegearData.AxleGear.LossMap);
Assert.AreEqual(genericAxlegearData.AxleGear.LossMap, specificAxlegearData.AxleGear.LossMap); var zipped =
genericAxlegearData.AxleGear.LossMap.LossMapSerialized.Zip(specificAxlegearData.AxleGear.LossMap
.LossMapSerialized);
Assert.IsTrue(zipped.All(x => x.First.Equals(x.Second, StringComparison.InvariantCultureIgnoreCase)));
//Assert(genericAxlegearData.AxleGear.LossMap.LossMapSerialized, specificAxlegearData.AxleGear.LossMap.LossMapSerialized);
} }
private void AssertAxlegearLossMap(TransmissionLossMap lossMap) private void AssertAxlegearLossMap(TransmissionLossMap lossMap)
...@@ -861,7 +865,9 @@ namespace TUGraz.VectoCore.Tests.Integration.CompletedBus ...@@ -861,7 +865,9 @@ namespace TUGraz.VectoCore.Tests.Integration.CompletedBus
Assert.AreEqual(RetarderType.TransmissionOutputRetarder, genericRetarder.Type); Assert.AreEqual(RetarderType.TransmissionOutputRetarder, genericRetarder.Type);
Assert.AreEqual(genericRetarder.Type, specificRetarder.Type); Assert.AreEqual(genericRetarder.Type, specificRetarder.Type);
Assert.AreEqual(genericRetarder.LossMap, specificRetarder.LossMap); var zipped = genericRetarder.LossMap.LossMapSerialized.Zip(specificRetarder.LossMap.LossMapSerialized);
Assert.IsTrue(zipped.All(x => x.First.Equals(x.Second, StringComparison.InvariantCultureIgnoreCase)));
//Assert.AreEqual(genericRetarder.LossMap, specificRetarder.LossMap);
} }
#endregion #endregion
...@@ -900,9 +906,12 @@ namespace TUGraz.VectoCore.Tests.Integration.CompletedBus ...@@ -900,9 +906,12 @@ namespace TUGraz.VectoCore.Tests.Integration.CompletedBus
private void AssertStopStartData(DriverData.EngineStopStartData engineStopStart) private void AssertStopStartData(DriverData.EngineStopStartData engineStopStart)
{ {
Assert.AreEqual(DeclarationData.Driver.GetEngineStopStartLorry().ActivationDelay, engineStopStart.EngineOffStandStillActivationDelay); var declarationValues = DeclarationData.Driver.GetEngineStopStartBus(
Assert.AreEqual(DeclarationData.Driver.GetEngineStopStartLorry().MaxEngineOffTimespan, engineStopStart.MaxEngineOffTimespan); VectoSimulationJobType.ConventionalVehicle, ArchitectureID.UNKNOWN, CompressorDrive.mechanically);
Assert.AreEqual(DeclarationData.Driver.GetEngineStopStartLorry().UtilityFactor, engineStopStart.UtilityFactorStandstill);
Assert.AreEqual(declarationValues.ActivationDelay, engineStopStart.EngineOffStandStillActivationDelay);
Assert.AreEqual(declarationValues.MaxEngineOffTimespan, engineStopStart.MaxEngineOffTimespan);
Assert.AreEqual(declarationValues.UtilityFactor, engineStopStart.UtilityFactorStandstill);
} }
private void AssertEcoRoll(DriverData.EcoRollData ecoRoll) private void AssertEcoRoll(DriverData.EcoRollData ecoRoll)
......
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