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

Skip to content
Snippets Groups Projects
Commit 021c393f authored by Franz KOBER josef's avatar Franz KOBER josef
Browse files

added PEV medium lorry E3 to reader

parent 4c6444db
No related branches found
No related tags found
No related merge requests found
......@@ -1404,19 +1404,22 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
// ---------------------------------------------------------------------------------------
public class XMLDeclarationPEVMediumLorryE2DataProviderV210 : XMLDeclarationHEVPxHeavyLorryDataProviderV210
public class XMLDeclarationPEVMediumLorryExDataProviderV210 : XMLDeclarationHEVPxHeavyLorryDataProviderV210
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V210_JOBS;
public new const string XSD_TYPE = "Vehicle_PEV_MediumLorryDeclarationType";
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public XMLDeclarationPEVMediumLorryE2DataProviderV210(IXMLDeclarationJobInputData jobData, XmlNode xmlNode, string sourceFile)
public XMLDeclarationPEVMediumLorryExDataProviderV210(IXMLDeclarationJobInputData jobData, XmlNode xmlNode, string sourceFile)
: base(jobData, xmlNode, sourceFile) { }
#region Overrides of XMLDeclarationVehicleDataProviderV10
public override IPTOTransmissionInputData PTOTransmissionInputData => null;
public override XmlElement PTONode => null;
public override IList<ITorqueLimitInputData> TorqueLimits =>
Components is XMLDeclarationHeavyLorryPEVExComponentDataV210 ? null : base.TorqueLimits;
#endregion
......
......@@ -55,8 +55,8 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.NinjectModules
Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationPEVHeavyLorryE2DataProviderV210>()
.Named(XMLDeclarationPEVHeavyLorryE2DataProviderV210.QUALIFIED_XSD_TYPE);
Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationPEVMediumLorryE2DataProviderV210>()
.Named(XMLDeclarationPEVMediumLorryE2DataProviderV210.QUALIFIED_XSD_TYPE);
Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationPEVMediumLorryExDataProviderV210>()
.Named(XMLDeclarationPEVMediumLorryExDataProviderV210.QUALIFIED_XSD_TYPE);
Bind<IXMLVehicleComponentsDeclaration>().To<XMLDeclarationCompletedBusComponentsDataProviderV210>()
.Named(XMLDeclarationCompletedBusComponentsDataProviderV210.QUALIFIED_XSD_TYPE);
......
......@@ -1188,7 +1188,37 @@ namespace TUGraz.VectoCore.Tests.XML
Assert.IsNotNull(vehicle.ElectricMotorTorqueLimits);
Assert.IsNull(vehicle.MaxPropulsionTorque);
}
[TestCase(@"MediumLorry\PEV_mediumLorry_E3.xml")]
public void TestPEVE3MediumLorry(string jobfile)
{
var filename = Path.Combine(BASE_DIR, jobfile);
var dataProvider = xmlInputReader.CreateDeclaration(XmlReader.Create(filename));
Assert.NotNull(dataProvider.JobInputData);
var vehicle = dataProvider.JobInputData.Vehicle;
Assert.NotNull(vehicle);
Assert.IsNull(vehicle.Components.EngineInputData);
Assert.IsNotNull(vehicle.Components.ElectricMachines);
Assert.AreEqual(1, vehicle.Components.ElectricMachines.Entries.Count);
Assert.AreEqual(PowertrainPosition.BatteryElectricE2, vehicle.Components.ElectricMachines.Entries[0].Position);
Assert.IsNull(vehicle.Components.IEPC);
Assert.IsNull(vehicle.Components.GearboxInputData);
Assert.IsNull(vehicle.Components.TorqueConverterInputData);
Assert.IsNull(vehicle.Components.AngledriveInputData);
Assert.IsNotNull(vehicle.Components.RetarderInputData);
Assert.IsNotNull(vehicle.Components.AxleGearInputData);
Assert.IsNotNull(vehicle.Components.AxleWheels);
Assert.IsNotNull(vehicle.Components.AuxiliaryInputData);
Assert.IsNull(vehicle.Components.BusAuxiliaries);
Assert.IsNotNull(vehicle.Components.AirdragInputData);
Assert.IsNotNull(vehicle.Components.ElectricStorage);
Assert.IsNull(vehicle.Components.PTOTransmissionInputData);
Assert.IsNotNull(vehicle.CargoVolume);
Assert.IsNull(vehicle.TorqueLimits);
Assert.IsNotNull(vehicle.ElectricMotorTorqueLimits);
Assert.IsNull(vehicle.MaxPropulsionTorque);
}
#region Test existence of torque converter
......
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