Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

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

changed typo in Namespace "Adaper" --> "Adapter"

parent e8bcee7d
No related branches found
No related tags found
No related merge requests found
Showing
with 106 additions and 127 deletions
......@@ -15,7 +15,6 @@ Imports TUGraz.VectoCommon.InputData
Imports TUGraz.VectoCommon.Utils
Imports TUGraz.VectoCore.Configuration
Imports TUGraz.VectoCore.InputData.Impl
Imports TUGraz.VectoCore.InputData.Reader.DataObjectAdaper
Imports TUGraz.VectoCore.Models.Declaration
Imports TUGraz.VectoCore.Models.SimulationComponent.Data
Imports TUGraz.VectoCore.Models.SimulationComponent.Data.Engine
......
......@@ -37,7 +37,6 @@ using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Configuration;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter;
using TUGraz.VectoCore.Models.Declaration;
using TUGraz.VectoCore.Models.Simulation.Data;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
......@@ -47,7 +46,7 @@ using TUGraz.VectoCore.OutputData;
using TUGraz.VectoCore.Utils;
using DriverData = TUGraz.VectoCore.Models.SimulationComponent.Data.DriverData;
namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdaper
namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
{
public class DeclarationDataAdapter : AbstractSimulationDataAdapter
{
......
......@@ -36,16 +36,14 @@ using TUGraz.VectoCommon.Exceptions;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter;
using TUGraz.VectoCore.Models.Declaration;
using TUGraz.VectoCore.Models.Simulation.Data;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
using TUGraz.VectoCore.Models.SimulationComponent.Data.Engine;
using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox;
using TUGraz.VectoCore.OutputData;
using DriverData = TUGraz.VectoCore.Models.SimulationComponent.Data.DriverData;
namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdaper
namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter
{
public class EngineeringDataAdapter : AbstractSimulationDataAdapter
{
......
......@@ -34,7 +34,7 @@ using System.Linq;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdaper;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter;
using TUGraz.VectoCore.Models.Declaration;
using TUGraz.VectoCore.Models.Simulation.Data;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
......
......@@ -32,7 +32,7 @@
using System.Collections.Generic;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdaper;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter;
using TUGraz.VectoCore.Models.Simulation.Data;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
......
......@@ -34,9 +34,9 @@ using System.Linq;
using System.Runtime.CompilerServices;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdaper;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter;
using TUGraz.VectoCore.Models.Simulation.Data;
using DriverData = TUGraz.VectoCore.Models.SimulationComponent.Data.DriverData;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
[assembly: InternalsVisibleTo("VectoCoreTest")]
......
......@@ -30,6 +30,7 @@
*/
using System;
using System.Collections.Generic;
using TUGraz.VectoCommon.Exceptions;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
......@@ -38,6 +39,7 @@ using TUGraz.VectoCore.Models.Connector.Ports;
using TUGraz.VectoCore.Models.Connector.Ports.Impl;
using TUGraz.VectoCore.Models.Simulation;
using TUGraz.VectoCore.Models.Simulation.Data;
using TUGraz.VectoCore.Models.Simulation.Impl;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
using TUGraz.VectoCore.OutputData;
using TUGraz.VectoCore.Utils;
......
......@@ -33,17 +33,15 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NUnit.Framework;
using TUGraz.VectoCommon.Exceptions;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdaper;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter;
using TUGraz.VectoCore.Models.Declaration;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
using TUGraz.VectoCore.Tests.Utils;
using TUGraz.VectoCore.Utils;
using Assert = Microsoft.VisualStudio.TestTools.UnitTesting.Assert;
using CrossWindCorrectionMode = TUGraz.VectoCommon.Models.CrossWindCorrectionMode;
namespace TUGraz.VectoCore.Tests.Models.Declaration
......@@ -54,9 +52,7 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration
public const double Tolerance = 0.0001;
public readonly MissionType[] Missions = EnumHelper.GetValues<MissionType>().ToArray();
[Test,
TestCase("285/70 R19.5", 7.9, 0.8943, "b"),
]
[TestCase("285/70 R19.5", 7.9, 0.8943, "b")]
public void WheelDataTest(string wheels, double intertia, double dynamicRadius, string sizeClass)
{
var tmp = DeclarationData.Wheels.Lookup(wheels);
......@@ -66,9 +62,7 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration
Assert.AreEqual(sizeClass, tmp.SizeClass);
}
[Test,
TestCase("15° DC Rims", 3.03, 3.05),
]
[TestCase("15° DC Rims", 3.03, 3.05)]
public void RimsDataTest(string rim, double fa, double fb)
{
var tmp = DeclarationData.Rims.Lookup(rim);
......@@ -77,7 +71,7 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration
Assert.AreEqual(fb, tmp.F_b, Tolerance);
}
[Test,
[
// fixed points
TestCase(400, 0),
TestCase(800, 0.47),
......@@ -114,7 +108,7 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration
AssertHelper.Exception<VectoException>(() => DeclarationData.PT1.Lookup(0.RPMtoRad()));
}
[Test]
[TestCase]
public void WHTCTest()
{
var whtc = DeclarationData.WHTCCorrection;
......@@ -136,7 +130,7 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration
}
}
[TestMethod]
[TestCase]
public void WHTCLookupTestLongHaul()
{
var expected = 1.015501;
......@@ -150,7 +144,7 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration
Assert.AreEqual(expected, lookup, 1e-8);
}
[TestMethod]
[Test]
public void WHTCLookupTestRegionalDelivery()
{
var expected = 1.02708700;
......@@ -242,7 +236,7 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration
crossWindCorrectionCurve.EffectiveAirDragArea(kmph.KMPHtoMeterPerSecond()));
}
[Test,
[
// fixed points
TestCase(150, 1.000, 1.000, 0.00),
TestCase(150, 1.100, 1.000, -40.34),
......@@ -332,19 +326,21 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration
}
}
[Test,
[
TestCase("",
new[] { 618, 671, 516, 566, 1037, 0, 0, 0, 0, 0 }),
TestCase("Crankshaft mounted - Electronically controlled visco clutch (Default)",
new[] { 618, 671, 516, 566, 1037, 0, 0, 0, 0, 0 }),
TestCase("Crankshaft mounted - Bimetallic controlled visco clutch", new[] { 818, 871, 676, 766, 1277, 0, 0, 0, 0, 0 }),
TestCase("Crankshaft mounted - Bimetallic controlled visco clutch", new[] { 818, 871, 676, 766, 1277, 0, 0, 0, 0, 0 }
),
TestCase("Crankshaft mounted - Discrete step clutch", new[] { 668, 721, 616, 616, 1157, 0, 0, 0, 0, 0 }),
TestCase("Crankshaft mounted - On/Off clutch", new[] { 718, 771, 666, 666, 1237, 0, 0, 0, 0, 0 }),
TestCase("Belt driven or driven via transm. - Electronically controlled visco clutch",
new[] { 889, 944, 733, 833, 1378, 0, 0, 0, 0, 0 }),
TestCase("Belt driven or driven via transm. - Bimetallic controlled visco clutch",
new[] { 1089, 1144, 893, 1033, 1618, 0, 0, 0, 0, 0 }),
TestCase("Belt driven or driven via transm. - Discrete step clutch", new[] { 939, 994, 883, 883, 1498, 0, 0, 0, 0, 0 }
TestCase("Belt driven or driven via transm. - Discrete step clutch",
new[] { 939, 994, 883, 883, 1498, 0, 0, 0, 0, 0 }
),
TestCase("Belt driven or driven via transm. - On/Off clutch", new[] { 989, 1044, 933, 933, 1578, 0, 0, 0, 0, 0 }),
TestCase("Hydraulic driven - Variable displacement pump", new[] { 738, 955, 632, 717, 1672, 0, 0, 0, 0, 0 }),
......@@ -636,7 +632,6 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration
trailerType: TrailerType.None, minLoad: 0, refLoad: 4400, trailerGrossVehicleWeight: 0, deltaCdA: 0, maxLoad: 8400);
}
/// <summary>
/// Segment 5: fixed reference weight, trailer always used
/// </summary>
......
......@@ -31,31 +31,27 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NUnit.Framework;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.InputData.FileIO.JSON;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdaper;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter;
using TUGraz.VectoCore.Models.Declaration;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
using TUGraz.VectoCore.Models.SimulationComponent.Data.Engine;
using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox;
using TUGraz.VectoCore.Tests.Utils;
using TUGraz.VectoCore.Utils;
using Assert = Microsoft.VisualStudio.TestTools.UnitTesting.Assert;
using Point = TUGraz.VectoCore.Utils.Point;
namespace TUGraz.VectoCore.Tests.Models.Declaration
{
[TestClass]
[TestFixture]
public class ShiftPolygonTest
{
[TestMethod]
[TestCase]
public void IntersectShiftLines1()
{
var upShift = new[] {
......@@ -86,7 +82,7 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration
}
}
[TestMethod]
[TestCase]
public void IntersectShiftLines2()
{
var upShift = new[] {
......@@ -126,8 +122,7 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration
}
}
[TestMethod]
[TestCase]
public void IntersectShiftLines3()
{
var upShift = new[] {
......@@ -168,7 +163,7 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration
}
}
[TestMethod]
[TestCase]
public void IntersectShiftLines4()
{
var upShift = new[] {
......@@ -209,7 +204,7 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration
}
}
[TestMethod]
[TestCase]
public void ShiftPolygonFldMarginTest()
{
var engineFld = new[] {
......@@ -264,7 +259,7 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration
}
}
[TestMethod]
[TestCase]
public void CorrectDownShiftByEngineFldTest()
{
var downshift = Edge.Create(new Point(10, 10), new Point(22, 20));
......@@ -294,7 +289,7 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration
Assert.AreEqual(20, corrected.P2.Y, 1e-3);
}
[TestMethod]
[TestCase]
public void CompueShiftPolygonDeclarationTest()
{
var engineFile = @"TestData\Components\40t_Long_Haul_Truck.veng";
......@@ -371,8 +366,7 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration
Assert.AreEqual(0, shiftPolygons.Last().Upshift.Count);
}
[TestMethod]
[TestCase]
public void CompueShiftPolygonDeclarationTestConfidentialEngine()
{
//var engineFldFile = @"E:\QUAM\Downloads\EngineFLD\Map_375c_BB1390_modTUG_R49_375c_BB1386.vfld";
......@@ -447,7 +441,7 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration
double idlingSpeed)
{
if (!Directory.Exists(BasePath)) {
NUnit.Framework.Assert.Ignore("Confidential File not found. Test cannot run without file.");
Assert.Ignore("Confidential File not found. Test cannot run without file.");
}
var engineData = new CombustionEngineData() {
......@@ -483,7 +477,6 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration
upshiftOrig, downshiftTransformed);
}
public static void ComputShiftPolygonPoints(int gear, FullLoadCurve fullLoadCurve,
IList<ITransmissionInputData> gears, CombustionEngineData engine, double axlegearRatio, Meter dynamicTyreRadius,
out List<Point> upshiftOrig, out List<Point> downshiftTransformed, out List<Point> downshiftOrig)
......
......@@ -31,18 +31,15 @@
using System;
using System.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NUnit.Framework;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdaper;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter;
using TUGraz.VectoCore.Models.Simulation.Data;
using TUGraz.VectoCore.Models.Simulation.Impl;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
using TUGraz.VectoCore.Models.SimulationComponent.Impl;
using TUGraz.VectoCore.Tests.Utils;
using TUGraz.VectoCore.Utils;
using Assert = Microsoft.VisualStudio.TestTools.UnitTesting.Assert;
namespace TUGraz.VectoCore.Tests.Models.SimulationComponent
{
......@@ -77,7 +74,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent
var accell = -0.256231159.SI<MeterPerSquareSecond>();
var gradient = Math.Atan(0.00366547048).SI<Radian>();
var retVal = requestPort.Request(absTime, dt, accell, gradient);
requestPort.Request(absTime, dt, accell, gradient);
Assert.AreEqual(-2305.43268, mockPort.Force.Value(), 0.0001);
Assert.AreEqual(16.954303841, mockPort.Velocity.Value(), 0.0001);
......@@ -136,12 +133,12 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent
var absTime = 0.SI<Second>();
var dt = 0.5.SI<Second>();
var retVal = vehicle.Request(absTime, dt, 0.SI<MeterPerSquareSecond>(), 0.SI<Radian>());
vehicle.Request(absTime, dt, 0.SI<MeterPerSquareSecond>(), 0.SI<Radian>());
vehicle.CommitSimulationStep(writer);
Assert.AreEqual(48201.2777, ((SI)writer[ModalResultField.P_air]).Value(), 0.1);
retVal = vehicle.Request(absTime, dt, 1.SI<MeterPerSquareSecond>(), 0.SI<Radian>());
vehicle.Request(absTime, dt, 1.SI<MeterPerSquareSecond>(), 0.SI<Radian>());
vehicle.CommitSimulationStep(writer);
Assert.AreEqual(49735.26379, ((SI)writer[ModalResultField.P_air]).Value(), 0.1);
}
......
......@@ -36,7 +36,6 @@ using TUGraz.VectoCommon.Exceptions;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.InputData.Reader;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdaper;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter;
using TUGraz.VectoCore.Models.SimulationComponent.Data.Engine;
using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox;
......
......@@ -37,7 +37,7 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.InputData.Reader;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdaper;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter;
using TUGraz.VectoCore.Models.Simulation.Data;
using TUGraz.VectoCore.Models.Simulation.Impl;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
......@@ -130,7 +130,6 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponentData
Assert.IsTrue(engineData.IsValid());
}
[TestMethod]
public void Validation_CombustionEngineData_Declaration()
{
......@@ -250,13 +249,11 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponentData
Assert.IsTrue(results.Any());
}
public class DeepDataObject
{
[Required, Range(41, 42)] protected int public_field = 5;
}
public abstract class ParentDataObject
{
#region 4 parent instance fields
......
......@@ -33,7 +33,7 @@ using TUGraz.VectoCommon.Exceptions;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.InputData.FileIO.JSON;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdaper;
using TUGraz.VectoCore.InputData.Reader.DataObjectAdapter;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
namespace TUGraz.VectoCore.Tests.Utils
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment