Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 3afc02cc authored by Michael KRISPER's avatar Michael KRISPER
Browse files

added additional tests in 1Hz: v_act >= 0 and fc_map >= 0 and v_act at the end...

added additional tests in 1Hz: v_act >= 0 and fc_map >= 0 and v_act at the end must be the same as in the original data
parent dd47abea
No related branches found
No related tags found
No related merge requests found
......@@ -256,6 +256,23 @@ namespace TUGraz.VectoCore.Tests.Integration
.Select(r => r.ParseDoubleOrGetDefault(ModalResultField.FCWHTCc.GetShortCaption()))
.Sum();
AssertHelper.AreRelativeEqual(sumFuelConsumption, sumFuelConsumption1Hz, "Fuel Consumption is not equal", 1e-4);
// test speed not negative
Assert.IsTrue(
modFile1Hz.Rows.Cast<DataRow>()
.All(r => r.ParseDouble(ModalResultField.v_act.GetShortCaption()).IsGreaterOrEqual(0)),
"v_act must not be negative.");
// test fuel consumption not negative
Assert.IsTrue(
modFile1Hz.Rows.Cast<DataRow>()
.All(r => r.ParseDouble(ModalResultField.FCWHTCc.GetShortCaption()).IsGreaterOrEqual(0)),
"fuel consumption must not be negative.");
// last v_act entry must be the same as original
var v_act = modFile.Rows.Cast<DataRow>().Last().ParseDouble((int)ModalResultField.v_act).SI<MeterPerSecond>();
var v_act1Hz = modFile1Hz.Rows.Cast<DataRow>().Last().ParseDouble((int)ModalResultField.v_act).SI<MeterPerSecond>();
AssertHelper.AreRelativeEqual(v_act, v_act1Hz, "end velocity is not equal", 1e-4);
}
[TestMethod, TestCategory("LongRunning")]
......
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