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 eeb42948 authored by Michael KRISPER's avatar Michael KRISPER
Browse files

changed test (P_aux returning unexpected DBNull)

parent 1d192c05
No related branches found
No related tags found
No related merge requests found
......@@ -29,6 +29,7 @@
* Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology
*/
using System;
using System.Data;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
......@@ -110,7 +111,8 @@ namespace TUGraz.VectoCore.Tests.Reports
var pRetIn = (Watt)row[(int)ModalResultField.P_retarder_in];
var pGbxInertia = (Watt)row[(int)ModalResultField.P_gbx_inertia];
var pEngInertia = (Watt)row[(int)ModalResultField.P_eng_inertia];
var pAux = (Watt)row[(int)ModalResultField.P_aux];
var pAux =
(Watt)(row[(int)ModalResultField.P_aux] != DBNull.Value ? row[(int)ModalResultField.P_aux] : 0.SI<Watt>());
var pBrakeLoss = (Watt)row[(int)ModalResultField.P_brake_loss];
var pBrakeIn = (Watt)row[(int)ModalResultField.P_brake_in];
var pClutchLoss = (Watt)row[(int)ModalResultField.P_clutch_loss];
......@@ -130,7 +132,6 @@ namespace TUGraz.VectoCore.Tests.Reports
Assert.AreEqual(pRetIn.Value(), (pAxleIn + pLossRet).Value(), 1E-3, "time: {0} distance: {1}", time, distance);
Assert.AreEqual(pGbxIn.Value(), pClutchOut.Value(), 1E-3, "time: {0} distance: {1}", time, distance);
Assert.AreEqual(pEngOut.Value(), (pClutchOut + pClutchLoss).Value(), 1E-3,
......
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