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

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

adding test for reading vehicle data

parent 8e7b2b64
No related branches found
No related tags found
No related merge requests found
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
namespace TUGraz.VectoCore.Tests.Models.SimulationComponentData
{
[TestClass]
public class VehicleDataTest
{
private const string VehicleDataFile = @"TestData\Components\24t Coach.vveh";
[TestMethod]
public void ReadVehicleFileTest()
{
var vehicleData = VehicleData.ReadFromFile(VehicleDataFile);
Assert.AreEqual(VehicleData.VehicleCategory.Coach, vehicleData.Category);
}
}
}
\ No newline at end of file
{
"Header": {
"CreatedBy": "Raphael Luz IVT TU-Graz (85407225-fc3f-48a8-acda-c84a05df6837)",
"Date": "3/4/2015 12:26:24 PM",
"AppVersion": "2.0.4-beta",
"FileVersion": 5
},
"Body": {
"SavedInDeclMode": false,
"VehCat": "Coach",
"CurbWeight": 15700.0,
"CurbWeightExtra": 0.0,
"Loading": 3300.0,
"MassMax": 24.0,
"Cd": 0.441,
"CrossSecArea": 7.4,
"rdyn": 520.0,
"Rim": "-",
"CdCorrMode": "CdOfV",
"CdCorrFile": "24t Coach.vcdv",
"Retarder": {
"Type": "Secondary",
"Ratio": 1.0,
"File": "Retarder.vrlm"
},
"AxleConfig": {
"Type": "6x2",
"Axles": [
{
"Inertia": 21.66667,
"Wheels": "-",
"AxleWeightShare": 0.4375,
"TwinTyres": false,
"RRCISO": 0.0055,
"FzISO": 62538.75
},
{
"Inertia": 10.83333,
"Wheels": "-",
"AxleWeightShare": 0.375,
"TwinTyres": true,
"RRCISO": 0.0065,
"FzISO": 52532.55
},
{
"Inertia": 21.66667,
"Wheels": "-",
"AxleWeightShare": 0.1875,
"TwinTyres": false,
"RRCISO": 0.0055,
"FzISO": 62538.75
}
]
}
}
}
\ No newline at end of file
......@@ -73,6 +73,7 @@
<Compile Include="Models\SimulationComponentData\FuelConsumptionMapTest.cs" />
<Compile Include="Models\SimulationComponentData\FullLoadCurveTest.cs" />
<Compile Include="Models\SimulationComponentData\GearboxDataTest.cs" />
<Compile Include="Models\SimulationComponentData\VehicleDataTest.cs" />
<Compile Include="Models\SimulationComponent\ClutchTest.cs" />
<Compile Include="Models\SimulationComponent\CombustionEngineTest.cs" />
<Compile Include="Models\SimulationComponent\GearboxTest.cs" />
......@@ -111,6 +112,9 @@
<None Include="TestData\Components\24t Coach.vgbx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="TestData\Components\24t Coach.vveh">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="TestData\Components\24t CoachInterpolated.vmap">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
......
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