Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit f6c3b782 authored by Harald Martini's avatar Harald Martini
Browse files

added Vocational HeavyLorry example files and tests

parent 12a97d76
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?>
<tns:VectoInputDeclaration xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" schemaVersion="2.0" xmlns:tns="urn:tugraz:ivt:VectoAPI:DeclarationInput:v2.0" xmlns:di="http://www.w3.org/2000/09/xmldsig#" xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationJob V:\VectoCore\VectoCore\Resources\XSD/VectoDeclarationJob.xsd" xmlns:v1.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v1.0" xmlns:v2.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0" xmlns:v2.1="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.1" xmlns:v2.3="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.3" xmlns:v2.4="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.4">
<v2.0:Vehicle xsi:type="Vehicle_Conventional_HeavyLorryDeclarationType" id="a">
<Manufacturer>TU Graz</Manufacturer>
<ManufacturerAddress>Inffeldgasse 19</ManufacturerAddress>
<Model>HEV Heavy Lorry Px</Model>
<VIN>1234</VIN>
<Date>2017-01-01T00:00:00Z</Date>
<LegislativeCategory>N3</LegislativeCategory>
<ChassisConfiguration>Rigid Lorry</ChassisConfiguration>
<AxleConfiguration>4x2</AxleConfiguration>
<CorrectedActualMass>4900</CorrectedActualMass>
<TechnicalPermissibleMaximumLadenMass>17900</TechnicalPermissibleMaximumLadenMass>
<IdlingSpeed>650</IdlingSpeed>
<RetarderType>None</RetarderType>
<AngledriveType>None</AngledriveType>
<PTO xsi:type="PTOType">
<PTOShaftsGearWheels>none</PTOShaftsGearWheels>
<PTOOtherElements>none</PTOOtherElements>
</PTO>
<ZeroEmissionVehicle>false</ZeroEmissionVehicle>
<VocationalVehicle>true</VocationalVehicle>
<NgTankSystem>Liquefied</NgTankSystem><!-- optional -->
<SleeperCab>false</SleeperCab>
<VehicleTypeApprovalNumber>ASDF</VehicleTypeApprovalNumber>
<ADAS xsi:type="ADAS_Conventional_Type">
<EngineStopStart>true</EngineStopStart>
<EcoRollWithoutEngineStop>false</EcoRollWithoutEngineStop>
<EcoRollWithEngineStop>true</EcoRollWithEngineStop>
<PredictiveCruiseControl>1,2,3</PredictiveCruiseControl>
</ADAS>
<TorqueLimits xsi:type="v2.0:TorqueLimitsType"><!-- optional -->
<v2.0:Entry gear="9" maxTorque="2000"/>
</TorqueLimits>
<Components xsi:type="Components_Conventional_LorryType">
<Engine>
<v2.0:Data xsi:type="v1.0:EngineDataDeclarationType" id="ENG-gooZah3D" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v1.0">
<Manufacturer>Generic Engine Manufacturer</Manufacturer>
<Model>Generic 40t Long Haul Truck Engine</Model>
<CertificationNumber>e12*0815/8051*2017/05E0000*00</CertificationNumber>
<Date>2017-02-15T11:00:00Z</Date>
<AppVersion>VectoEngine x.y</AppVersion>
<Displacement>12730</Displacement>
<IdlingSpeed>560</IdlingSpeed>
<RatedSpeed>2200</RatedSpeed>
<RatedPower>380000</RatedPower>
<MaxEngineTorque>2300</MaxEngineTorque>
<WHTCUrban>1.0097</WHTCUrban>
<WHTCRural>1.0035</WHTCRural>
<WHTCMotorway>1.0200</WHTCMotorway>
<BFColdHot>1.0000</BFColdHot>
<CFRegPer>1.0000</CFRegPer>
<CFNCV>1.0000</CFNCV>
<FuelType>NG</FuelType>
<FuelConsumptionMap>
<Entry engineSpeed="560.00" torque="-149.00" fuelConsumption="0.00"/>
<Entry engineSpeed="560.00" torque="1180.00" fuelConsumption="12869.00"/>
<Entry engineSpeed="2100.00" torque="-320.00" fuelConsumption="0.00"/>
<Entry engineSpeed="2100.00" torque="1100.00" fuelConsumption="50653.00"/>
</FuelConsumptionMap>
<FullLoadAndDragCurve>
<Entry engineSpeed="560.00" maxTorque="1180.00" dragTorque="-149.00"/>
<Entry engineSpeed="1800.00" maxTorque="1800.00" dragTorque="-300.00"/>
<Entry engineSpeed="2100.00" maxTorque="1100.00" dragTorque="-320.00"/>
</FullLoadAndDragCurve>
</v2.0:Data>
<v2.0:Signature>
<di:Reference URI="#ENG-gooZah3D">
<di:Transforms>
<di:Transform Algorithm="urn:vecto:xml:2017:canonicalization"/>
<di:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</di:Transforms>
<di:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<di:DigestValue>/qqS7iMvDm0MYurhsIRZTF5FeS+MNA2HnoS1P8SrSdA=</di:DigestValue>
</di:Reference>
</v2.0:Signature>
</Engine>
<Gearbox>
<v2.0:Data id="gbx-vi2Oak2N" xsi:type="v2.0:GearboxDataDeclarationType" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0">
<Manufacturer>Generic Gearbox Manufacturer</Manufacturer>
<Model>Generic 40t Long Haul Truck Gearbox</Model>
<CertificationNumber>e12*0815/8051*2017/05E0000*00</CertificationNumber>
<Date>2017-01-11T11:00:00Z</Date>
<AppVersion>3.0.1</AppVersion>
<TransmissionType>AMT</TransmissionType>
<MainCertificationMethod>Standard values</MainCertificationMethod>
<Gears xsi:type="GearsDeclarationType">
<Gear number="1">
<Ratio>14.930</Ratio>
<MaxTorque>1900</MaxTorque>
<MaxSpeed>2000</MaxSpeed>
<TorqueLossMap>
<Entry inputSpeed="0.00" inputTorque="-1000.00" torqueLoss="25.06"/>
<Entry inputSpeed="0.00" inputTorque="50.00" torqueLoss="6.06"/>
<Entry inputSpeed="0.00" inputTorque="3000.00" torqueLoss="54.06"/>
<Entry inputSpeed="2100.00" inputTorque="-1000.00" torqueLoss="35.69"/>
<Entry inputSpeed="2100.00" inputTorque="50.00" torqueLoss="16.69"/>
<Entry inputSpeed="2100.00" inputTorque="3000.00" torqueLoss="64.69"/>
</TorqueLossMap>
</Gear>
<Gear number="2">
<Ratio>11.640</Ratio>
<MaxTorque>1900</MaxTorque>
<MaxSpeed>2000</MaxSpeed>
<TorqueLossMap>
<Entry inputSpeed="0.00" inputTorque="-1000.00" torqueLoss="25.06"/>
<Entry inputSpeed="0.00" inputTorque="50.00" torqueLoss="6.06"/>
<Entry inputSpeed="0.00" inputTorque="3000.00" torqueLoss="54.06"/>
<Entry inputSpeed="2100.00" inputTorque="-1000.00" torqueLoss="35.69"/>
<Entry inputSpeed="2100.00" inputTorque="50.00" torqueLoss="16.69"/>
<Entry inputSpeed="2100.00" inputTorque="3000.00" torqueLoss="64.69"/>
</TorqueLossMap>
</Gear>
</Gears>
</v2.0:Data>
<v2.0:Signature>
<di:Reference URI="#gbx-vi2Oak2N">
<di:Transforms>
<di:Transform Algorithm="urn:vecto:xml:2017:canonicalization"/>
<di:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</di:Transforms>
<di:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<di:DigestValue>8fsWE1AvinkI5UcWuU/vyx3X2kKjarP/qPC+Uon+aBE=</di:DigestValue>
</di:Reference>
</v2.0:Signature>
</Gearbox>
<TorqueConverter><!-- optional -->
<v2.0:Data xsi:type="v1.0:TorqueConverterDataDeclarationType" id="TQ-1234" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v1.0">
<Manufacturer>Some Manufacturer</Manufacturer>
<Model>Some Model</Model>
<CertificationNumber>e12*0815/8051*2017/05E0000*00</CertificationNumber>
<Date>2017-02-15T11:00:00Z</Date>
<AppVersion>TC CalcApp 123</AppVersion>
<CertificationMethod>Standard values</CertificationMethod>
<Characteristics>
<Entry speedRatio="0.0000" torqueRatio="1.00" inputTorqueRef="300.00"/>
<Entry speedRatio="0.5000" torqueRatio="1.00" inputTorqueRef="200.00"/>
<Entry speedRatio="0.9000" torqueRatio="0.90" inputTorqueRef="200.00"/>
</Characteristics>
</v2.0:Data>
<v2.0:Signature>
<di:Reference URI="#TQ-1234">
<di:Transforms>
<di:Transform Algorithm="urn:vecto:xml:2017:canonicalization"/>
<di:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</di:Transforms>
<di:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<di:DigestValue>P8mKieew0dWJFSIPapRXdUf2FsYG4ONvolD5kjkYEkw=</di:DigestValue>
</di:Reference>
</v2.0:Signature>
</TorqueConverter>
<Angledrive><!-- optional -->
<v2.0:Data id="agl-vi2Oak2N" xsi:type="v2.0:AngledriveDataDeclarationType" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0">
<Manufacturer>Generic Gearbox Manufacturer</Manufacturer>
<Model>Generic 40t Long Haul Truck Gearbox</Model>
<CertificationNumber>e12*0815/8051*2017/05E0000*00</CertificationNumber>
<Date>2017-01-11T11:00:00Z</Date>
<AppVersion>3.0.1</AppVersion>
<Ratio>2.345</Ratio>
<CertificationMethod>Standard values</CertificationMethod>
<TorqueLossMap>
<Entry inputSpeed="0.00" inputTorque="-10000.00" torqueLoss="100.00"/>
<Entry inputSpeed="1000.00" inputTorque="-1000.00" torqueLoss="100.00"/>
<Entry inputSpeed="0.00" inputTorque="0.00" torqueLoss="10.00"/>
<Entry inputSpeed="1000.00" inputTorque="0.00" torqueLoss="10.00"/>
<Entry inputSpeed="0.00" inputTorque="10000.00" torqueLoss="100.00"/>
<Entry inputSpeed="1000.00" inputTorque="1000.00" torqueLoss="100.00"/>
</TorqueLossMap>
</v2.0:Data>
<v2.0:Signature>
<di:Reference URI="#agl-vi2Oak2N">
<di:Transforms>
<di:Transform Algorithm="urn:vecto:xml:2017:canonicalization"/>
<di:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</di:Transforms>
<di:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<di:DigestValue>iVRxT+wETVrlCQhZMsiqRC1mKcw3a3KSeb1y5uhINQk=</di:DigestValue>
</di:Reference>
</v2.0:Signature>
</Angledrive>
<Retarder><!-- optional -->
<v2.0:Data id="RET-Shai9imi" xsi:type="v2.0:RetarderDataDeclarationType" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0">
<Manufacturer>Generic Retarder Manufacturer</Manufacturer>
<Model>Generic Retarder</Model>
<CertificationNumber>e12*0815/8051*2017/05E0000*00</CertificationNumber>
<Date>2017-01-11T11:00:00Z</Date>
<AppVersion>3.0.1</AppVersion>
<CertificationMethod>Standard values</CertificationMethod>
<RetarderLossMap>
<Entry retarderSpeed="0.00" torqueLoss="10.00"/>
<Entry retarderSpeed="2300.00" torqueLoss="20.58"/>
</RetarderLossMap>
</v2.0:Data>
<v2.0:Signature>
<di:Reference URI="#RET-Shai9imi">
<di:Transforms>
<di:Transform Algorithm="urn:vecto:xml:2017:canonicalization"/>
<di:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</di:Transforms>
<di:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<di:DigestValue>xcfok6Uo1kvFefSRo+W/oMfEfS5BdTklBugAjby2DUQ=</di:DigestValue>
</di:Reference>
</v2.0:Signature>
</Retarder>
<Axlegear>
<v2.0:Data id="AXL-EC3ohnoh" xsi:type="v2.0:AxlegearDataDeclarationType" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0">
<Manufacturer>Generic Gearbox Manufacturer</Manufacturer>
<Model>Generic 40t Long Haul Truck AxleGear</Model>
<CertificationNumber>e12*0815/8051*2017/05E0000*00</CertificationNumber>
<Date>2017-01-11T11:00:00Z</Date>
<AppVersion>3.0.1</AppVersion>
<LineType>Single portal axle</LineType>
<Ratio>2.590</Ratio>
<CertificationMethod>Standard values</CertificationMethod>
<TorqueLossMap>
<Entry inputSpeed="0.00" inputTorque="-5000.00" torqueLoss="115.00"/>
<Entry inputSpeed="0.00" inputTorque="0.00" torqueLoss="40.00"/>
<Entry inputSpeed="0.00" inputTorque="15000.00" torqueLoss="265.00"/>
<Entry inputSpeed="2100.00" inputTorque="-5000.00" torqueLoss="115.00"/>
<Entry inputSpeed="2100.00" inputTorque="0.00" torqueLoss="40.00"/>
<Entry inputSpeed="2100.00" inputTorque="35000.00" torqueLoss="565.00"/>
</TorqueLossMap>
</v2.0:Data>
<v2.0:Signature>
<di:Reference URI="#AXL-EC3ohnoh">
<di:Transforms>
<di:Transform Algorithm="urn:vecto:xml:2017:canonicalization"/>
<di:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</di:Transforms>
<di:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<di:DigestValue>Ux2vo+s07pGr9XCbvNs/YbJcFaZClORRGXpP6Eyeze8=</di:DigestValue>
</di:Reference>
</v2.0:Signature>
</Axlegear>
<AxleWheels>
<v2.0:Data xsi:type="v2.0:AxleWheelsDataDeclarationType" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0">
<Axles>
<Axle axleNumber="1" xsi:type="AxleDataDeclarationType">
<AxleType>VehicleNonDriven</AxleType>
<TwinTyres>false</TwinTyres>
<Steered>true</Steered>
<Tyre>
<Data id="WHL-5432198760-315-70-R22.5" xsi:type="TyreDataDeclarationType">
<Manufacturer>Generic Wheels Manufacturer</Manufacturer>
<Model>Generic Wheel</Model>
<CertificationNumber>e12*0815/8051*2017/05E0000*00</CertificationNumber>
<Date>2017-01-11T14:00:00Z</Date>
<AppVersion>Tyre Generation App 1.0</AppVersion>
<Dimension>315/70 R22.5</Dimension>
<RRCDeclared>0.0055</RRCDeclared>
<FzISO>31300</FzISO>
</Data>
<Signature>
<di:Reference URI="#WHL-5432198760-315-70-R22.5">
<di:Transforms>
<di:Transform Algorithm="urn:vecto:xml:2017:canonicalization"/>
<di:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</di:Transforms>
<di:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<di:DigestValue>A/sq1ng4cqeOyauDUqUEnonRSPch3VCqZDX9Pf3tW1Q=</di:DigestValue>
</di:Reference>
</Signature>
</Tyre>
</Axle>
<Axle axleNumber="2" xsi:type="AxleDataDeclarationType">
<AxleType>VehicleDriven</AxleType>
<TwinTyres>true</TwinTyres>
<Steered>false</Steered>
<Tyre>
<Data id="WHL-5432198760-315-70-R22.5" xsi:type="TyreDataDeclarationType">
<Manufacturer>Generic Wheels Manufacturer</Manufacturer>
<Model>Generic Wheel</Model>
<CertificationNumber>e12*0815/8051*2017/05E0000*00</CertificationNumber>
<Date>2017-01-11T14:00:00Z</Date>
<AppVersion>Tyre Generation App 1.0</AppVersion>
<Dimension>315/70 R22.5</Dimension>
<RRCDeclared>0.0063</RRCDeclared>
<FzISO>31300</FzISO>
</Data>
<Signature>
<di:Reference URI="#WHL-5432198760-315-70-R22.5">
<di:Transforms>
<di:Transform Algorithm="urn:vecto:xml:2017:canonicalization"/>
<di:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</di:Transforms>
<di:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<di:DigestValue>z+KDXmc5MIezM6RVgfYax5J9Efi0ghciG2/wLLmWaBk=</di:DigestValue>
</di:Reference>
</Signature>
</Tyre>
</Axle>
</Axles>
</v2.0:Data>
</AxleWheels>
<Auxiliaries>
<Data xsi:type="AUX_Conventional_LorryDataType">
<Fan>
<Technology>Hydraulic driven - Constant displacement pump</Technology>
</Fan>
<SteeringPump>
<Technology axleNumber="1">Variable displacement elec. controlled</Technology>
</SteeringPump>
<ElectricSystem>
<Technology>Standard technology - LED headlights, all</Technology>
</ElectricSystem>
<PneumaticSystem>
<Technology>Medium Supply 2-stage</Technology>
</PneumaticSystem>
<HVAC>
<Technology>Default</Technology>
</HVAC>
</Data>
</Auxiliaries>
<AirDrag><!-- optional -->
<Data id="CabinX23h" xsi:type="v2.0:AirDragDataDeclarationType" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0">
<Manufacturer>Generic Manufacturer</Manufacturer>
<Model>Generic Model</Model>
<CertificationNumber>e12*0815/8051*2017/05E0000*00</CertificationNumber>
<Date>2017-03-24T15:00:00Z</Date>
<AppVersion>Vecto AirDrag x.y</AppVersion>
<CdxA_0>6.31</CdxA_0>
<TransferredCdxA>6.32</TransferredCdxA>
<DeclaredCdxA>6.34</DeclaredCdxA>
</Data>
<v2.0:Signature>
<di:Reference URI="#CabinX23h">
<di:Transforms>
<di:Transform Algorithm="urn:vecto:xml:2017:canonicalization"/>
<di:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</di:Transforms>
<di:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<di:DigestValue>NroIsfnT7+1zYG5CTHxpclh0ZaRZvGyrfFPmWdKbFbg=</di:DigestValue>
</di:Reference>
</v2.0:Signature>
</AirDrag>
</Components>
</v2.0:Vehicle>
</tns:VectoInputDeclaration>
......@@ -4,12 +4,14 @@ using System.IO;
using System.Linq;
using System.Xml;
using System.Xml.Linq;
using System.Xml.XPath;
using Newtonsoft.Json;
using Ninject;
using NUnit.Framework;
using TUGraz.VectoCommon.Exceptions;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Resources;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore;
using TUGraz.VectoCore.InputData.FileIO.JSON;
......@@ -46,6 +48,10 @@ namespace VectoMockupTest
protected const string ConventionalHeavyLorry = BasePath + @"HeavyLorry\Conventional_heavyLorry_AMT.xml";
protected const string ConventionalHeavyLorry_DifferentTyres = BasePathMockup + @"HeavyLorry\Conventional_heavyLorry_AMT_DifferentTyres.xml";
protected const string ConventionalHeavyLorry_AT_Angledrive = BasePathMockup + @"HeavyLorry\Conventional_heavyLorry_AT_Angledrive.xml";
protected const string ConventionalHeavyLorry_Vocational =
BasePath + @"HeavyLorry\Conventional_heavyLorry_AMT_Vocational.xml";
protected const string HEV_Px_HeavyLorry = BasePath + @"HeavyLorry\HEV_heavyLorry_AMT_Px_IHPC.xml";
protected const string HEV_S2_HeavyLorry = BasePath + @"HeavyLorry\HEV-S_heavyLorry_AMT_S2.xml";
protected const string HEV_S3_HeavyLorry = BasePath + @"HeavyLorry\HEV-S_heavyLorry_S3.xml";
......@@ -53,6 +59,7 @@ namespace VectoMockupTest
protected const string HEV_S4_HeavyLorry = BasePath + @"HeavyLorry\HEV-S_heavyLorry_S4.xml";
protected const string HEV_IEPC_S_HeavyLorry = BasePath + @"HeavyLorry\HEV-S_heavyLorry_IEPC-S.xml";
protected const string PEV_E2_HeavyLorry = BasePath + @"HeavyLorry\PEV_heavyLorry_AMT_E2.xml";
protected const string PEV_E2_HeavyLorry_Vocational = BasePath + @"HeavyLorry\PEV_heavyLorry_AMT_E2_Vocational.xml";
protected const string PEV_E3_HeavyLorry = BasePath + @"HeavyLorry\PEV_heavyLorry_E3.xml";
protected const string PEV_E4_HeavyLorry = BasePath + @"HeavyLorry\PEV_heavyLorry_E4.xml";
protected const string PEV_IEPC_HeavyLorry = BasePath + @"HeavyLorry\IEPC_heavyLorry.xml";
......@@ -243,6 +250,7 @@ namespace VectoMockupTest
[TestCase(ConventionalHeavyLorry, TestName = "ConventionalHeavyLorry")]
[TestCase(ConventionalHeavyLorry_DifferentTyres, TestName = "ConventionalHeavyLorry_DifferentTyres")]
[TestCase(ConventionalHeavyLorry_AT_Angledrive, TestName = "ConventionalHeavyLorry_AT_Angledrive")]
[TestCase(ConventionalHeavyLorry_Vocational, TestName = "ConventionalHeavyLorry_Vocational")]
//[TestCase(ConventionalHeavyLorry, false, TestName = "ConventionalHeavyLorryNoMockup")]
[TestCase(HEV_S2_HeavyLorry, TestName = "HEV_S2_HeavyLorry")]
[TestCase(HEV_S3_HeavyLorry, TestName = "HEV_S3_HeavyLorry")]
......@@ -250,6 +258,7 @@ namespace VectoMockupTest
[TestCase(HEV_S4_HeavyLorry, TestName = "HEV_S4_HeavyLorry")]
[TestCase(HEV_Px_HeavyLorry, TestName = "HEV_Px_HeavyLorry")]
[TestCase(PEV_E2_HeavyLorry, TestName = "PEV_E2_HeavyLorry")]
[TestCase(PEV_E2_HeavyLorry_Vocational, TestName = "PEV_E2_HeavyLorry_Vocational")]
//[TestCase(PEV_E2_HeavyLorry, false, TestName = "PEV_E2_HeavyLorryNoMockup")]
[TestCase(PEV_E3_HeavyLorry, TestName = "PEV_E3_HeavyLorry")]
[TestCase(PEV_E4_HeavyLorry, TestName = "PEV_E4_HeavyLorry")]
......@@ -279,7 +288,7 @@ namespace VectoMockupTest
public void LorryMockupTest(string fileName, bool mockup = true)
{
CopyInputFile(fileName);
var inputProvider = _inputDataReader.Create(fileName);
var inputProvider = _inputDataReader.CreateDeclaration(fileName);
var fileWriter = GetOutputFileWriter(TestContext.CurrentContext.Test.Name, fileName);
var sumWriter = new SummaryDataContainer(null);
var jobContainer = new JobContainer(sumWriter);
......@@ -294,6 +303,19 @@ namespace VectoMockupTest
CheckFileExists(fileWriter);
Assert.IsTrue(MRF_CIF_WriterTestBase.ValidateAndPrint(XDocument.Load(fileWriter.XMLFullReportName), XmlDocumentType.ManufacturerReport), "MRF invalid");
Assert.IsTrue(MRF_CIF_WriterTestBase.ValidateAndPrint(XDocument.Load(fileWriter.XMLCustomerReportName), XmlDocumentType.CustomerReport), "CIF invalid");
if (inputProvider.JobInputData.Vehicle.VocationalVehicle) {
Assert.IsFalse(CheckElementExists(XMLNames.Report_Results_Summary, fileWriter.XMLCustomerReportName));
} else {
Assert.IsTrue(CheckElementExists(XMLNames.Report_Results_Summary, fileWriter.XMLCustomerReportName));
}
}
public bool CheckElementExists(string name, string fileName)
{
var xDoc = XDocument.Load(fileName);
return xDoc.XPathSelectElements($"//*[local-name()='{name}']").FirstOrDefault() != null;
}
......@@ -339,94 +361,6 @@ namespace VectoMockupTest
}
//[TestCase(Conventional_InterimBus, Conventional_StageInput, TestName = "ConventionalInterimBus")]
//public void InterimBusMockupTest(string vifInput, string stageInputFile)
//{
// CopyInputFile(vifInput);
// //SimulatorFactory.MockUpRun = mockup;
// var multistageBusInput = _inputDataReader.Create(vifInput) as IMultistepBusInputDataProvider;
// Assert.NotNull(multistageBusInput);
// var stageInput = _inputDataReader.CreateDeclaration(stageInputFile);
// var fileWriter = GetOutputFileWriter(TestContext.CurrentContext.Test.Name, vifInput);
// var sumWriter = new SummaryDataContainer(null);
// var jobContainer = new JobContainer(sumWriter);
// var inputData = new XMLDeclarationVIFInputData(multistageBusInput, stageInput.JobInputData.Vehicle);
// var _simulatorFactory =
// _simFactoryFactory.Factory(ExecutionMode.Declaration, inputData, fileWriter, null, null, true);
// Clearfiles(fileWriter);
// jobContainer.AddRuns(_simulatorFactory);
// jobContainer.Execute(false);
// jobContainer.WaitFinished();
// CheckFileExists(fileWriter, checkMrf:false, checkCif: false, checkVif: true);
//}
//[TestCase(Conventional_CompletedBus, TestName = "ConventionalCompletedBus")]
//public void CompletedBusMockupTest(string fileName)
//{
// CopyInputFile(fileName);
// //SimulatorFactory.MockUpRun = mockup;
// XMLDeclarationVIFInputData input = null!;
// var fileWriter = GetOutputFileWriter(TestContext.CurrentContext.Test.Name, fileName);
// using (var reader = XmlReader.Create(fileName))
// {
// input = new XMLDeclarationVIFInputData(_inputDataReader.Create(fileName) as IMultistepBusInputDataProvider, null);
// fileWriter = new FileOutputVIFWriter(fileName, input.MultistageJobInputData.JobInputData.ManufacturingStages.Count);
// }
// var sumWriter = new SummaryDataContainer(null);
// var jobContainer = new JobContainer(sumWriter);
// var _simulatorFactory =
// _simFactoryFactory.Factory(ExecutionMode.Declaration, input, fileWriter, null, null, true);
// Clearfiles(fileWriter);
// jobContainer.AddRuns(_simulatorFactory);
// jobContainer.Execute(false);
// jobContainer.WaitFinished();
// CheckFileExists(fileWriter, checkCif: true, checkVif: false);
//}
//[TestCase(CompleteDiesel, TestName="CompleteDiesel")]
// [TestCase(CompleteExempted, TestName = "CompleteExempted Bus")]
// [TestCase(CompleteExemptedWithoutTPMLM, TestName = "CompleteExempted No TPMLM")]
//public void PrimaryAndCompletedTest(string fileName)
//{
// var fileWriter = GetOutputFileWriter(TestContext.CurrentContext.Test.Name, fileName);
// var sumWriter = new SummaryDataContainer(null);
// var jobContainer = new JobContainer(sumWriter);
// var input = JSONInputDataFactory.ReadJsonJob(fileName);
// var _simulatorFactory =
// _simFactoryFactory.Factory(ExecutionMode.Declaration, input, fileWriter, null, null, true);
// Clearfiles(fileWriter);
// jobContainer.AddRuns(_simulatorFactory);
// jobContainer.Execute(false);
// jobContainer.WaitFinished();
// CheckFileExists(fileWriter, checkCif: true, checkVif: true, checkMrf: true, checkPrimaryMrf: true);
//}
//[TestCase(InterimDiesel, TestName = "PrimaryAndInterim")]
//public void PrimaryAndInterim(string fileName)
//{
// var fileWriter = GetOutputFileWriter(TestContext.CurrentContext.Test.Name, fileName);
// var sumWriter = new SummaryDataContainer(null);
// var jobContainer = new JobContainer(sumWriter);
// var input = JSONInputDataFactory.ReadJsonJob(fileName);
// var _simulatorFactory =
// _simFactoryFactory.Factory(ExecutionMode.Declaration, input, fileWriter, null, null, true);
// Clearfiles(fileWriter);
// jobContainer.AddRuns(_simulatorFactory);
// jobContainer.Execute(false);
// jobContainer.WaitFinished();
// CheckFileExists(fileWriter, checkCif: false, checkVif: true, checkMrf:false, checkPrimaryMrf:true);
//}
[TestCase(Conventional_PrimaryBus_Tyres, Conventional_InterimBusInput, "Conventional", TestName = "Interim_Conventional_Bus_DifferentTyres")]
[TestCase(Conventional_PrimaryBus_AT_Angledrive, Conventional_InterimBusInput, "Conventional", TestName = "Interim_Conventional_Bus_AT_Angledrive")]
......
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