diff --git a/VectoCore/VectoCoreTest/FileIO/JsonTest.cs b/VectoCore/VectoCoreTest/FileIO/JsonTest.cs index 422c8c8d4d9d25de51fbe7aeecc085bb975259eb..69f9c6ad9a986dd37c4c79d9775fef01d3c506b2 100644 --- a/VectoCore/VectoCoreTest/FileIO/JsonTest.cs +++ b/VectoCore/VectoCoreTest/FileIO/JsonTest.cs @@ -176,16 +176,15 @@ namespace TUGraz.VectoCore.Tests.FileIO } [TestMethod] - public void TestReadAngleGear() + public void JSON_Read_AngleGear() { var json = (JObject)JToken.ReadFrom(new JsonTextReader(File.OpenText(TestVehicleFile))); - var angleGear = json["Body"]["AngleGear"].Value<string>(); + var angleGear = json["Body"]["AngularGear"]; - var angleGearType = angleGear.ParseEnum<AngularGearType>(); - - Assert.AreEqual(AngularGearType.LossesIncludedInGearbox, angleGearType); - - Assert.Fail("not implemented"); + Assert.AreEqual(AngularGearType.SeparateAngularGear, + angleGear["Type"].Value<string>().ParseEnum<AngularGearType>()); + Assert.AreEqual(3.5, angleGear["Ratio"].Value<double>()); + Assert.AreEqual("AngularGear.vtlm", angleGear["LossMap"].Value<string>()); } } diff --git a/VectoCore/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs b/VectoCore/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs index f8b418d3619b39cbdefa68321c32d50d4f148e61..d5c107b4ddc73c196086a83a8b852436e19140e6 100644 --- a/VectoCore/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs +++ b/VectoCore/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs @@ -668,12 +668,10 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration maxLoad: 25000); } - [Test] public static void AssertMission(Mission m, dynamic vehicleData, MissionType missionType, string cosswindCorrection, double[] axleWeightDistribution, double[] trailerAxleWeightDistribution, double bodyCurbWeight, double trailerCurbWeight, TrailerType trailerType, double minLoad, double refLoad, double maxLoad, - double trailerGrossVehicleWeight, - double deltaCdA) + double trailerGrossVehicleWeight, double deltaCdA) { Assert.AreEqual(missionType, m.MissionType); Assert.AreEqual(cosswindCorrection, m.CrossWindCorrection); diff --git a/VectoCore/VectoCoreTest/Models/Declaration/ShiftPolygonTest.cs b/VectoCore/VectoCoreTest/Models/Declaration/ShiftPolygonTest.cs index 0337e898844a048d648bc7fd491e6f811c722f74..9c035c5b13dc6a62dbc41639006859bec7aaed00 100644 --- a/VectoCore/VectoCoreTest/Models/Declaration/ShiftPolygonTest.cs +++ b/VectoCore/VectoCoreTest/Models/Declaration/ShiftPolygonTest.cs @@ -375,7 +375,7 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration //@"TestData\Components\40t_Long_Haul_Truck.vgbx"; if (!File.Exists(engineFldFile)) { - Assert.Inconclusive("Confidential File not found. Test cannot run without file."); + Assert.Ignore("Confidential File not found. Test cannot run without file."); } var rdyn = 0.4882675.SI<Meter>(); diff --git a/VectoCore/VectoCoreTest/Models/Simulation/FactoryTest.cs b/VectoCore/VectoCoreTest/Models/Simulation/FactoryTest.cs index 3546a59338edcb4862173be5a444cef9b2f88fd3..59dfec738e9da4c973e5abd6c9924b3bb7edb1ed 100644 --- a/VectoCore/VectoCoreTest/Models/Simulation/FactoryTest.cs +++ b/VectoCore/VectoCoreTest/Models/Simulation/FactoryTest.cs @@ -60,7 +60,7 @@ namespace TUGraz.VectoCore.Tests.Models.Simulation var run = factory.SimulationRuns().First(); var vehicleContainer = (VehicleContainer)run.GetContainer(); - Assert.AreEqual(11, vehicleContainer.SimulationComponents().Count); + Assert.AreEqual(12, vehicleContainer.SimulationComponents().Count); Assert.IsInstanceOfType(vehicleContainer.Gearbox, typeof(Gearbox), "gearbox not installed"); Assert.IsInstanceOfType(vehicleContainer.Engine, typeof(CombustionEngine), "engine not installed"); @@ -69,7 +69,6 @@ namespace TUGraz.VectoCore.Tests.Models.Simulation var gearbox = vehicleContainer.Gearbox as Gearbox; Assert.IsNotNull(gearbox); - // -- shiftpolygon downshift // no downshift curve in first gear! @@ -112,7 +111,7 @@ namespace TUGraz.VectoCore.Tests.Models.Simulation var run = factory.SimulationRuns().First(); var vehicleContainer = (VehicleContainer)run.GetContainer(); - Assert.AreEqual(11, vehicleContainer.SimulationComponents().Count); + Assert.AreEqual(12, vehicleContainer.SimulationComponents().Count); Assert.IsInstanceOfType(vehicleContainer.Gearbox, typeof(Gearbox), "gearbox not installed"); Assert.IsInstanceOfType(vehicleContainer.Engine, typeof(CombustionEngine), "engine not installed"); diff --git a/VectoCore/VectoCoreTest/Models/Simulation/PowerTrainBuilderTest.cs b/VectoCore/VectoCoreTest/Models/Simulation/PowerTrainBuilderTest.cs index 767ddfa82f95a085a3788760722927af69167151..bf763849d77adee88cae0f4bfddede189586e742 100644 --- a/VectoCore/VectoCoreTest/Models/Simulation/PowerTrainBuilderTest.cs +++ b/VectoCore/VectoCoreTest/Models/Simulation/PowerTrainBuilderTest.cs @@ -65,7 +65,7 @@ namespace TUGraz.VectoCore.Tests.Models.Simulation var powerTrain = builder.Build(runData); Assert.IsInstanceOfType(powerTrain, typeof(IVehicleContainer)); - Assert.AreEqual(11, powerTrain.SimulationComponents().Count); + Assert.AreEqual(12, powerTrain.SimulationComponents().Count); Assert.IsInstanceOfType(powerTrain.Engine, typeof(CombustionEngine)); Assert.IsInstanceOfType(powerTrain.Gearbox, typeof(Gearbox)); diff --git a/VectoCore/VectoCoreTest/TestData/Components/24t Coach.vveh b/VectoCore/VectoCoreTest/TestData/Components/24t Coach.vveh index 4951d9ed78b5388b0f539c228206b669765d46c9..c6d1b54abc8606981c19c15f4be5c255d9628b79 100644 --- a/VectoCore/VectoCoreTest/TestData/Components/24t Coach.vveh +++ b/VectoCore/VectoCoreTest/TestData/Components/24t Coach.vveh @@ -23,9 +23,9 @@ "File": "Retarder.vrlm" }, "AngularGear": { - "Type" : "SeparateAngleGear", + "Type" : "SeparateAngularGear", "Ratio": 3.5, - "LossMap": "AngleGear.vtlm" + "LossMap": "AngularGear.vtlm" }, "AxleConfig": { "Type": "6x2",