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

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

added IEPC medium lorry to reader

parent 6d332b54
No related branches found
No related tags found
No related merge requests found
......@@ -1476,6 +1476,25 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
#endregion
}
// ---------------------------------------------------------------------------------------
public class XMLDeclarationIEPCMediumLorryDataProviderV210 : XMLDeclarationVehicleDataProviderV10
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V210_JOBS;
public new const string XSD_TYPE = "Vehicle_IEPC_MediumLorryDeclarationType";
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public XMLDeclarationIEPCMediumLorryDataProviderV210(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 => null;
#endregion
}
}
\ No newline at end of file
......@@ -64,6 +64,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.NinjectModules
Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationIEPCHeavyLorryDataProviderV210>()
.Named(XMLDeclarationIEPCHeavyLorryDataProviderV210.QUALIFIED_XSD_TYPE);
Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationIEPCMediumLorryDataProviderV210>()
.Named(XMLDeclarationIEPCMediumLorryDataProviderV210.QUALIFIED_XSD_TYPE);
Bind<IXMLVehicleComponentsDeclaration>().To<XMLDeclarationCompletedBusComponentsDataProviderV210>()
.Named(XMLDeclarationCompletedBusComponentsDataProviderV210.QUALIFIED_XSD_TYPE);
......
......@@ -1369,6 +1369,36 @@ namespace TUGraz.VectoCore.Tests.XML
Assert.IsNull(vehicle.MaxPropulsionTorque);
}
[TestCase(@"MediumLorry\IEPC_mediumLorry.xml")]
public void TestIEPCMediumLorry(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.IsNull(vehicle.Components.ElectricMachines);
Assert.IsNotNull(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.IsNull(vehicle.ElectricMotorTorqueLimits);
Assert.IsNull(vehicle.MaxPropulsionTorque);
}
#region Test existence of torque converter
private void TestTorqueConverter(IVehicleDeclarationInputData vehicle)
......
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