diff --git a/VectoCore/VectoCoreTest/Models/SimulationComponent/ATGearboxTest.cs b/VectoCore/VectoCoreTest/Models/SimulationComponent/ATGearboxTest.cs index 66c8ec0de8eff19e245b45107d95d4bef2b9d2d4..e84ed5e7500888f67281e06a47490a6095a0a047 100644 --- a/VectoCore/VectoCoreTest/Models/SimulationComponent/ATGearboxTest.cs +++ b/VectoCore/VectoCoreTest/Models/SimulationComponent/ATGearboxTest.cs @@ -276,7 +276,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent vehicleInput, engineInput.EngineModes.First(), mission); //(engineInput, null, gearboxInput, new List<ITorqueLimitInputData>()); return dao.CreateGearboxData( - new MockDeclarationVehicleInputData() { + new MockVehicleInputData() { Components = new MockComponents() { GearboxInputData = gearboxInput, TorqueConverterInputData = (ITorqueConverterDeclarationInputData)gearboxInput, diff --git a/VectoCore/VectoCoreTest/Utils/MockDeclarationVehicleInputData.cs b/VectoCore/VectoCoreTest/Utils/MockDeclarationVehicleInputData.cs index 04f7efa156444387d4fa75e27b27d30ad3429b30..be422960bd1be27ab79709f744f9be9f797295ad 100644 --- a/VectoCore/VectoCoreTest/Utils/MockDeclarationVehicleInputData.cs +++ b/VectoCore/VectoCoreTest/Utils/MockDeclarationVehicleInputData.cs @@ -7,8 +7,9 @@ using TUGraz.VectoCommon.Models; using TUGraz.VectoCommon.Utils; using TUGraz.VectoCore.Models.SimulationComponent.Impl; -namespace TUGraz.VectoCore.Tests.Utils { - public class MockDeclarationVehicleInputData : IVehicleDeclarationInputData +namespace TUGraz.VectoCore.Tests.Utils +{ + public class MockDeclarationVehicleInputData : IVehicleDeclarationInputData, IVehicleComponentsDeclaration { #region Implementation of IComponentInputData @@ -34,13 +35,7 @@ namespace TUGraz.VectoCore.Tests.Utils { public AxleConfiguration AxleConfiguration { get; } public Kilogram CurbMassChassis { get; } public Kilogram GrossVehicleMassRating { get; } - - private IList<ITorqueLimitInputData> _torqueLimits; - public IList<ITorqueLimitInputData> TorqueLimits { - get => _torqueLimits ??= new List<ITorqueLimitInputData>(); - init => _torqueLimits = value; - } - + public IList<ITorqueLimitInputData> TorqueLimits => new List<ITorqueLimitInputData>(); public string ManufacturerAddress { get; } public PerSecond EngineIdleSpeed { get; } public bool VocationalVehicle { get; } @@ -69,11 +64,9 @@ namespace TUGraz.VectoCore.Tests.Utils { public Meter EntranceHeight { get; } public ConsumerTechnology? DoorDriveTechnology { get; } public VehicleDeclarationType VehicleDeclarationType { get; } - public Dictionary<PowertrainPosition, List<Tuple<Volt, TableData>>> ElectricMotorTorqueLimits { get; } public TableData BoostingLimitations { get; } - - public IVehicleComponentsDeclaration Components { get; set; } + public IVehicleComponentsDeclaration Components => this; public XmlNode XMLSource { get; } public string VehicleTypeApprovalNumber { get; } public ArchitectureID ArchitectureID { get; } @@ -199,8 +192,8 @@ namespace TUGraz.VectoCore.Tests.Utils { public IElectricStorageSystemEngineeringInputData ElectricStorage { get; set; } public IElectricMachinesEngineeringInputData ElectricMachines { get; set; } - Dictionary<PowertrainPosition, List<Tuple<Volt, TableData>>> IVehicleDeclarationInputData.ElectricMotorTorqueLimits => throw new NotImplementedException(); + Dictionary<PowertrainPosition, List<Tuple<Volt, TableData>>> IVehicleDeclarationInputData.ElectricMotorTorqueLimits => throw new NotImplementedException(); - #endregion - } + #endregion + } } \ No newline at end of file diff --git a/VectoCore/VectoCoreTest/Utils/MockVehicleInputData.cs b/VectoCore/VectoCoreTest/Utils/MockVehicleInputData.cs new file mode 100644 index 0000000000000000000000000000000000000000..d5502a5023b79e6cc793b1c65d518ef7cb6c6bef --- /dev/null +++ b/VectoCore/VectoCoreTest/Utils/MockVehicleInputData.cs @@ -0,0 +1,121 @@ +using System; +using System.Collections.Generic; +using System.Xml; +using TUGraz.VectoCommon.BusAuxiliaries; +using TUGraz.VectoCommon.InputData; +using TUGraz.VectoCommon.Models; +using TUGraz.VectoCommon.Utils; + +namespace TUGraz.VectoCore.Tests.Utils +{ + public class MockVehicleInputData : IVehicleDeclarationInputData + { + public DataSource DataSource { get; set; } + + public bool SavedInDeclarationMode { get; set; } + + public string Manufacturer { get; set; } + + public string Model { get; set; } + + public DateTime Date { get; set; } + + public string AppVersion { get; } + + public CertificationMethod CertificationMethod { get; set; } + + public string CertificationNumber { get; set; } + + public DigestData DigestValue { get; set; } + + public string Identifier { get; set; } + + public bool ExemptedVehicle { get; set; } + + public string VIN { get; set; } + + public TUGraz.VectoCommon.Models.LegislativeClass? LegislativeClass { get; set; } + + public VehicleCategory VehicleCategory { get; set; } + + public AxleConfiguration AxleConfiguration { get; set; } + + public Kilogram CurbMassChassis { get; set; } + + public Kilogram GrossVehicleMassRating { get; set; } + + public IList<ITorqueLimitInputData> TorqueLimits { get; set; } + + public string ManufacturerAddress { get; set; } + + public PerSecond EngineIdleSpeed { get; set; } + + public bool VocationalVehicle { get; set; } + + public bool? SleeperCab { get; set; } + + public bool? AirdragModifiedMultistep { get; } + + public TUGraz.VectoCommon.InputData.TankSystem? TankSystem { get; set; } + + public IAdvancedDriverAssistantSystemDeclarationInputData ADAS { get; set; } + + public bool ZeroEmissionVehicle { get; set; } + + public bool HybridElectricHDV { get; set; } + + public bool DualFuelVehicle { get; set; } + + public Watt MaxNetPower1 { get; set; } + + public Watt MaxNetPower2 { get; set; } + + public string ExemptedTechnology { get; } + + public RegistrationClass? RegisteredClass { get; } + + public int? NumberPassengerSeatsUpperDeck { get; } + + public int? NumberPassengerSeatsLowerDeck { get; } + + public int? NumberPassengersStandingLowerDeck { get; } + + public int? NumberPassengersStandingUpperDeck { get; } + + public CubicMeter CargoVolume { get; } + + public TUGraz.VectoCommon.Models.VehicleCode? VehicleCode { get; } + + public bool? LowEntry { get; } + + public bool Articulated { get; } + + public Meter Height { get; } + + public Meter Length { get; } + + public Meter Width { get; } + + public Meter EntranceHeight { get; } + + public ConsumerTechnology? DoorDriveTechnology { get; } + + public VehicleDeclarationType VehicleDeclarationType { get; } + + public Dictionary<PowertrainPosition, List<Tuple<Volt, TableData>>> ElectricMotorTorqueLimits { get; } + + public TableData BoostingLimitations => throw new NotImplementedException(); + + public IVehicleComponentsDeclaration Components { get; set; } + + public XmlNode XMLSource { get; } + + public string VehicleTypeApprovalNumber { get; } + + public ArchitectureID ArchitectureID { get; } + + public bool OvcHev { get; } + + public Watt MaxChargingPower { get; } + } +} \ No newline at end of file