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

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

adapt expected values in testcases due to changes in LH cycle

parent 8e2aaadc
No related branches found
No related tags found
No related merge requests found
......@@ -66,10 +66,10 @@ namespace TUGraz.VectoCore.Tests.Integration.Declaration
xmlInputReader = _kernel.Get<IXMLInputDataReader>();
}
[TestCase(null, 1.0, 45.7715457, TestName = "Engine CF - NONE"),
TestCase("CFRegPer", 1.2, 45.7715457 * 1.2, TestName = "Engine CF - CFRegPer"),
TestCase("BFColdHot", 1.2, 45.7715457 * 1.2, TestName = "Engine CF - BFColdHod"),
TestCase("CFNCV", 1.2, 45.7715457, TestName = "Engine CF - CFNCV") // has no influence - only for documentation purpose
[TestCase(null, 1.0, 44.9120687, TestName = "Engine CF - NONE"),
TestCase("CFRegPer", 1.2, 44.9120687 * 1.2, TestName = "Engine CF - CFRegPer"),
TestCase("BFColdHot", 1.2, 44.9120687 * 1.2, TestName = "Engine CF - BFColdHod"),
TestCase("CFNCV", 1.2, 44.9120687, TestName = "Engine CF - CFNCV") // has no influence - only for documentation purpose
]
public void TestEngineCorrectionFactors(string correctionFactor, double value, double expectedFc)
{
......
......@@ -71,10 +71,9 @@ namespace TUGraz.VectoCore.Tests.Integration.Declaration
xmlInputReader = _kernel.Get<IXMLInputDataReader>();
}
[
TestCase(Class5NG, 2, TankSystem.Liquefied, 262.3, 726.64, TestName = "Class5 LNG 2"),
TestCase(Class5NG, 2, TankSystem.Compressed, 268.3, 721.82, TestName = "Class5 CNG 2"),
TestCase(Class5NG, 2, TankSystem.Liquefied, 249.8, 692.01, TestName = "Class5 LNG 2"),
TestCase(Class5NG, 2, TankSystem.Compressed, 255.5, 687.43, TestName = "Class5 CNG 2"),
TestCase(Class5NG, 6, TankSystem.Liquefied, 253.3, 701.63, TestName = "Class5 LNG 6"),
TestCase(Class5NG, 6, TankSystem.Compressed, 259.1, 696.98, TestName = "Class5 CNG 6"),
]
......
......@@ -62,40 +62,40 @@ namespace TUGraz.VectoCore.Tests.Integration
[Category("Integration")]
[TestCase(FuelType.DieselCI, null,
@"TestData\Integration\DeclarationMode\Class2_RigidTruck_4x2\Class2_RigidTruck_DECL.vecto", 0,
0.000218492361921757, 0.000218492361921757, 26.1354499906408, 0.000683881092815101, 9329.62385405905,
0.000216752542154492, 0.000216752542154492, 25.9273375782886, 0.000678435456943561, 9255.33354999683,
TestName = "Diesel LH Low"),
TestCase(FuelType.EthanolCI, null,
@"TestData\Integration\DeclarationMode\Class2_RigidTruck_4x2\Class2_RigidTruck_DECL.vecto", 0,
0.000218492361921757, 0.000221072980369653, 26.9601195572747, 0.000400142094469071, 5615.25370138917,
0.000216752542154492, 0.000219312611550018, 26.7454404329291, 0.000396955826905533, 5570.54033337047,
TestName = "Ethanol/CI LH Low"),
TestCase(FuelType.DieselCI, null,
@"TestData\Integration\DeclarationMode\Class2_RigidTruck_4x2\Class2_RigidTruck_DECL.vecto", 1,
0.000253200804935895, 0.000253200804935895, 30.2871776239108, 0.00079251851944935, 10811.6743707627,
0.000248197742331471, 0.000248197742331471, 29.6887251592669, 0.000776858933497505, 10598.0435975538,
TestName = "Diesel LH Ref"),
TestCase(FuelType.EthanolCI, null,
@"TestData\Integration\DeclarationMode\Class2_RigidTruck_4x2\Class2_RigidTruck_DECL.vecto", 1,
0.000253200804935895, 0.000256191365624114, 31.2428494663554, 0.000463706371779646, 6507.2606868525,
0.000248197742331471, 0.000251129211729087, 30.6255136254984, 0.000454543873229647, 6378.68197791881,
TestName = "Ethanol/CI LH Ref"),
TestCase(FuelType.EthanolPI, null,
@"TestData\Integration\DeclarationMode\Class2_RigidTruck_4x2\Class2_RigidTruck_DECL.vecto", 1,
0.000253200804935895, 0.000251472471796401, 31.9939531547584, 0.000528092190772442, 7368.14342363454,
0.000248197742331471, 0.000246503559789959, 31.3617760547022, 0.000517657475558915, 7222.55430184581,
TestName = "Ethanol/PI LH Ref"),
TestCase(FuelType.PetrolPI, null,
@"TestData\Integration\DeclarationMode\Class2_RigidTruck_4x2\Class2_RigidTruck_DECL.vecto", 1,
0.000253200804935895, 0.000253200804935895, 33.8503749914298, 0.00076973044700512, 10507.8334048396,
0.000248197742331471, 0.000248197742331471, 33.1815163544747, 0.000754521136687672, 10300.2063067561,
TestName = "Petrol/PI LH Ref"),
TestCase(FuelType.LPGPI, null,
@"TestData\Integration\DeclarationMode\Class2_RigidTruck_4x2\Class2_RigidTruck_DECL.vecto", 1,
0.000253200804935895, 0.000253200804935895, null, 0.000764666430906402, 11647.2370270512,
0.000248197742331471, 0.000248197742331471, null, 0.000749557181841043, 11417.0961472477,
TestName = "LPG/PI LH Ref"),
TestCase(FuelType.NGPI, TankSystem.Liquefied,
@"TestData\Integration\DeclarationMode\Class2_RigidTruck_4x2\Class2_RigidTruck_DECL.vecto", 1,
0.000253200804935895, 0.000232573448118307, null, 0.00064422845128771, 11419.3563026089,
0.000248197742331471, 0.000227977966988786, null, 0.000631498968558938, 11193.7181791494,
TestName = "LNG/PI LH Ref"),
TestCase(FuelType.NGPI, TankSystem.Compressed,
@"TestData\Integration\DeclarationMode\Class2_RigidTruck_4x2\Class2_RigidTruck_DECL.vecto", 1,
0.000253200804935895, 0.000237903256304352, null, 0.000639959759458707, 11419.3563026089,
0.000248197742331471, 0.000233202462065613, null, 0.000627314622956498, 11193.7181791494,
TestName = "CNG/PI LH Ref"),
]
public void TestFuelTypesCO2(FuelType fuelType, TankSystem? tankSystem, string jobName, int runIdx,
......
......@@ -267,13 +267,13 @@ namespace TUGraz.VectoCore.Tests.Integration
var view = new DataView(sumData.Table, "", SummaryDataContainer.Fields.SORT, DataViewRowState.CurrentRows).ToTable();
Console.WriteLine(string.Join("; ", view.AsEnumerable().Select(x => x[string.Format(SummaryDataContainer.Fields.FCMAP_KM, "")].ToString().ToDouble())));
// 203.250695482581; 244.501164243499; 169.943109853321; 182.880939697492; 221.727012960826; 251.838137183945
Assert.AreEqual(203.25069, view.Rows[0][string.Format(SummaryDataContainer.Fields.FCMAP_KM, "")].ToString().ToDouble(), 1e-3);
Assert.AreEqual(244.50116, view.Rows[1][string.Format(SummaryDataContainer.Fields.FCMAP_KM, "")].ToString().ToDouble(), 1e-3);
Assert.AreEqual(169.94310, view.Rows[2][string.Format(SummaryDataContainer.Fields.FCMAP_KM, "")].ToString().ToDouble(), 1e-3);
Assert.AreEqual(182.88093, view.Rows[3][string.Format(SummaryDataContainer.Fields.FCMAP_KM, "")].ToString().ToDouble(), 1e-3);
Assert.AreEqual(221.72701, view.Rows[4][string.Format(SummaryDataContainer.Fields.FCMAP_KM, "")].ToString().ToDouble(), 1e-3);
Assert.AreEqual(251.83813, view.Rows[5][string.Format(SummaryDataContainer.Fields.FCMAP_KM, "")].ToString().ToDouble(), 1e-3);
// 199.750225533639; 235.82213490632; 169.943109853321; 182.880939697492; 221.727012960826; 251.838137183945
Assert.AreEqual(199.750225533639, view.Rows[0][string.Format(SummaryDataContainer.Fields.FCMAP_KM, "")].ToString().ToDouble(), 1e-3);
Assert.AreEqual(235.82213490632, view.Rows[1][string.Format(SummaryDataContainer.Fields.FCMAP_KM, "")].ToString().ToDouble(), 1e-3);
Assert.AreEqual(169.943109853321, view.Rows[2][string.Format(SummaryDataContainer.Fields.FCMAP_KM, "")].ToString().ToDouble(), 1e-3);
Assert.AreEqual(182.880939697492, view.Rows[3][string.Format(SummaryDataContainer.Fields.FCMAP_KM, "")].ToString().ToDouble(), 1e-3);
Assert.AreEqual(221.727012960826, view.Rows[4][string.Format(SummaryDataContainer.Fields.FCMAP_KM, "")].ToString().ToDouble(), 1e-3);
Assert.AreEqual(251.838137183945, view.Rows[5][string.Format(SummaryDataContainer.Fields.FCMAP_KM, "")].ToString().ToDouble(), 1e-3);
}
[TestCase(EngineSpeedLimitJobATDecl)]
......
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