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

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

Made Auxiliary tests compileable

parent 0a5db999
No related branches found
No related tags found
No related merge requests found
......@@ -340,8 +340,8 @@ Public Class Vehicle
Public ReadOnly Property GrossVehicleMassRating As Kilogram _
Implements IVehicleDeclarationInputData.GrossVehicleMassRating
Get
Return MassMax.SI().Ton.Cast(Of Kilogram)()
End Get
Return MassMax.SI(Unit.SI.Ton).Cast(Of Kilogram)()
End Get
End Property
Public ReadOnly Property TorqueLimits As IList(Of ITorqueLimitInputData) _
......@@ -413,8 +413,8 @@ Public Class Vehicle
Public ReadOnly Property IVehicleEngineeringInputData_DynamicTyreRadius As Meter _
Implements IVehicleEngineeringInputData.DynamicTyreRadius
Get
Return DynamicTyreRadius.SI().Milli.Meter.Cast(Of Meter)()
End Get
Return DynamicTyreRadius.SI(Unit.SI.Milli.Meter).Cast(Of Meter)()
End Get
End Property
Public ReadOnly Property IVehicleEngineeringInputData_Loading As Kilogram _
......
......@@ -105,7 +105,7 @@ Namespace IntegrationTests
Debug.Print("{0}", aux.AA_TotalCycleFC_Grams)
Next
Assert.AreEqual(79.303.SI().Gramm.Value(), aux.AA_TotalCycleFC_Grams().Value(), 0.0001)
Assert.AreEqual(79.303.SI(Unit.SI.Gramm).Value(), aux.AA_TotalCycleFC_Grams().Value(), 0.0001)
aux.Signals.EngineDrivelinePower = (-15 * 1000).SI(Of Watt)()
aux.Signals.EngineDrivelineTorque = aux.Signals.EngineDrivelinePower / (1256.RPMtoRad())
......@@ -117,7 +117,7 @@ Namespace IntegrationTests
Debug.Print("{0}", aux.AA_TotalCycleFC_Grams)
Next
Assert.AreEqual(82.5783.SI().Gramm.Value(), aux.AA_TotalCycleFC_Grams().Value(), 0.0001)
Assert.AreEqual(82.5783.SI(Unit.SI.Gramm).Value(), aux.AA_TotalCycleFC_Grams().Value(), 0.0001)
aux.Signals.EngineDrivelinePower = (driveLinePower * 1000).SI(Of Watt)()
aux.Signals.EngineDrivelineTorque = aux.Signals.EngineDrivelinePower / (1256.RPMtoRad())
......@@ -128,7 +128,7 @@ Namespace IntegrationTests
aux.CycleStep(1.SI(Of Second), msg)
Next
Assert.AreEqual(162.4655.SI().Gramm.Value(), aux.AA_TotalCycleFC_Grams().Value(), 0.0001)
Assert.AreEqual(162.4655.SI(Unit.SI.Gramm).Value(), aux.AA_TotalCycleFC_Grams().Value(), 0.0001)
End Sub
End Class
End Namespace
\ No newline at end of file
......@@ -48,8 +48,8 @@ Public Class M1_Mock
AveragePowerDemandAtAlternatorFromHVACElectricsWatts.SI(Of Watt)()
_AveragePowerDemandAtCrankFromHVACElectricsWatts = AveragePowerDemandAtCrankFromHVACElectricsWatts.SI(Of Watt)()
_AveragePowerDemandAtCrankFromHVACMechanicalsWatts = AveragePowerDemandAtCrankFromHVACMechanicalsWatts.SI(Of Watt)()
_HVACFuelingLitresPerHour = HVACFuelingLitresPerHour.SI().Liter.Per.Hour.Cast(Of LiterPerSecond)() _
'(Of LiterPerHour)()
End Sub
_HVACFuelingLitresPerHour = HVACFuelingLitresPerHour.SI(Unit.SI.Liter.Per.Hour).Cast(Of LiterPerSecond)() _
'(Of LiterPerHour)()
End Sub
End Class
......@@ -32,9 +32,9 @@ Namespace UnitTests
target.CycleStep(1.SI(Of Second))
Assert.AreEqual(out1.SI().Gramm.Value(), target.AverageLoadsFuelConsumptionInterpolatedForPneumatics.Value(), 0.001)
Assert.AreEqual(out2.SI().Gramm.Value(), target.FuelConsumptionSmartPneumaticsAndAverageElectricalPowerDemand.Value(), 0.001)
End Sub
Assert.AreEqual(out1.SI(Unit.SI.Gramm).Value(), target.AverageLoadsFuelConsumptionInterpolatedForPneumatics.Value(), 0.001)
Assert.AreEqual(out2.SI(Unit.SI.Gramm).Value(), target.FuelConsumptionSmartPneumaticsAndAverageElectricalPowerDemand.Value(), 0.001)
End Sub
End Class
End Namespace
......
......@@ -41,11 +41,11 @@ Namespace UnitTests
'Act
Dim target = New M12(M10Mock.Object, m11Mock.Object, sgnlsMock.Object)
'Assert
Assert.AreEqual(target.FuelconsumptionwithsmartElectricsandAveragePneumaticPowerDemand().Value(),
OUT1.SI().Gramm.Value(), 0.001)
Assert.AreEqual(target.BaseFuelConsumptionWithTrueAuxiliaryLoads().Value(), OUT2.SI().Gramm.Value(), 0.001)
End Sub
'Assert
Assert.AreEqual(target.FuelconsumptionwithsmartElectricsandAveragePneumaticPowerDemand().Value(),
OUT1.SI(Unit.SI.Gramm).Value(), 0.001)
Assert.AreEqual(target.BaseFuelConsumptionWithTrueAuxiliaryLoads().Value(), OUT2.SI(Unit.SI.Gramm).Value(), 0.001)
End Sub
End Class
End Namespace
......
......@@ -55,9 +55,9 @@ Namespace UnitTests
'Act
Dim target = New M13(m10.Object, m11.Object, m12.Object, Signals.Object)
'Assert
Assert.AreEqual(OUT1.SI().Gramm.Value(), target.WHTCTotalCycleFuelConsumptionGrams.Value(), 0.001)
End Sub
'Assert
Assert.AreEqual(OUT1.SI(Unit.SI.Gramm).Value(), target.WHTCTotalCycleFuelConsumptionGrams.Value(), 0.001)
End Sub
End Class
End Namespace
......
......@@ -117,10 +117,10 @@ Namespace UnitTests
'Act
Dim m14 As New M14(m13.Object, ssmMock, constants, signals.Object)
'Assert
Assert.AreEqual(expectedOut1.SI().Gramm.Value(), m14.TotalCycleFCGrams.Value(), 0.1)
Assert.AreEqual(expectedOut2.SI().Liter.Value(), m14.TotalCycleFCLitres.Value(), 0.00001)
End Sub
'Assert
Assert.AreEqual(expectedOut1.SI(Unit.SI.Gramm).Value(), m14.TotalCycleFCGrams.Value(), 0.1)
Assert.AreEqual(expectedOut2.SI(Unit.SI.Liter).Value(), m14.TotalCycleFCLitres.Value(), 0.00001)
End Sub
End Class
End Namespace
......
......@@ -61,9 +61,9 @@ Namespace UnitTests
Assert.AreEqual(target.LitresOfAirCompressorOnContinually.Value(), AG1, 0.000001)
Assert.AreEqual(target.LitresOfAirCompressorOnOnlyInOverrun.Value(), AG2, 0.000001)
Assert.AreEqual(target.TotalCycleFuelConsumptionCompressorOnContinuously.Value(), AG3.SI().Gramm.Value(), 0.000001)
Assert.AreEqual(target.TotalCycleFuelConsumptionCompressorOffContinuously.Value(), AG4.SI().Gramm.Value(), 0.000001)
End Sub
Assert.AreEqual(target.TotalCycleFuelConsumptionCompressorOnContinuously.Value(), AG3.SI(Unit.SI.Gramm).Value(), 0.000001)
Assert.AreEqual(target.TotalCycleFuelConsumptionCompressorOffContinuously.Value(), AG4.SI(Unit.SI.Gramm).Value(), 0.000001)
End Sub
<Test()> _
......
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