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

Skip to content
Snippets Groups Projects
Commit 6d692b42 authored by Harald MARTINI's avatar Harald MARTINI
Browse files

Updated XML Writing

Created VECTO3GUITestProject
parent 1f20e69d
No related branches found
No related tags found
No related merge requests found
Showing
with 433 additions and 20 deletions
......@@ -74,6 +74,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VectoAPI", "..\VECTO_API_DE
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VECTO3GUI2020", "VECTO3GUI2020\VECTO3GUI2020.csproj", "{7E9172D4-07E3-4077-814E-7117AB2B3E22}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vecto3GUITest", "Vecto3GUITest\Vecto3GUITest.csproj", "{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug PerformanceStats|Any CPU = Debug PerformanceStats|Any CPU
......@@ -908,6 +910,48 @@ Global
{7E9172D4-07E3-4077-814E-7117AB2B3E22}.ReleaseTUG|x64.Build.0 = Release|Any CPU
{7E9172D4-07E3-4077-814E-7117AB2B3E22}.ReleaseTUG|x86.ActiveCfg = Release|Any CPU
{7E9172D4-07E3-4077-814E-7117AB2B3E22}.ReleaseTUG|x86.Build.0 = Release|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug PerformanceStats|Any CPU.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug PerformanceStats|Any CPU.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug PerformanceStats|x64.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug PerformanceStats|x64.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug PerformanceStats|x86.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug PerformanceStats|x86.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug PerformanceTrace|Any CPU.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug PerformanceTrace|Any CPU.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug PerformanceTrace|x64.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug PerformanceTrace|x64.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug PerformanceTrace|x86.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug PerformanceTrace|x86.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug|x64.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug|x64.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug|x86.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Debug|x86.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.DebugTUG|Any CPU.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.DebugTUG|Any CPU.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.DebugTUG|x64.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.DebugTUG|x64.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.DebugTUG|x86.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.DebugTUG|x86.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Deploy|Any CPU.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Deploy|Any CPU.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Deploy|x64.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Deploy|x64.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Deploy|x86.ActiveCfg = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Deploy|x86.Build.0 = Debug|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Release|Any CPU.Build.0 = Release|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Release|x64.ActiveCfg = Release|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Release|x64.Build.0 = Release|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Release|x86.ActiveCfg = Release|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.Release|x86.Build.0 = Release|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.ReleaseTUG|Any CPU.ActiveCfg = Release|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.ReleaseTUG|Any CPU.Build.0 = Release|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.ReleaseTUG|x64.ActiveCfg = Release|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.ReleaseTUG|x64.Build.0 = Release|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.ReleaseTUG|x86.ActiveCfg = Release|Any CPU
{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}.ReleaseTUG|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
......@@ -18,7 +18,7 @@ namespace VECTO3GUI2020.Ninject
{
public override void Load()
{
Bind<IXMLWriterFactory>().ToFactory(() => new UseFirstArgumentTypeAsNameInstanceProvider());
Bind<IXMLWriterFactory>().ToFactory(() => new UseFirstArgumentTypeAsNameInstanceProvider(fallback:true));
//Bind<IMultiStageViewModelFactory>().ToFactory(() => new UseFirstArgumentAsNameInstanceProvider(skipFirstArgument: true, fallback: true));
Bind<IMultiStageViewModelFactory>().ToFactory();
Bind<IJobEditViewModelFactory>().ToFactory(() => new UseFirstArgumentTypeAsNameInstanceProvider());
......
......@@ -100,6 +100,8 @@ namespace VECTO3GUI2020.Ninject
XMLAirDragWriter_v2_0.SUPPORTED_VERSIONS,
sv => Bind<IXMLComponentWriter>().To<XMLAirDragWriter_v2_0>().Named(sv));
Bind<IXMLBusAuxiliariesWriter>().To<XMLBusAuxiliariesWriterMultistage>();
}
}
}
......@@ -37,6 +37,12 @@ namespace VECTO3GUI2020.Util.XML.Implementation.ComponentWriter
return _xElement;
}
public XElement GetElement(XNamespace wrapperNamespace)
{
throw new NotImplementedException();
}
protected abstract void Initialize();
protected abstract void CreateDataElements();
......@@ -65,7 +71,7 @@ namespace VECTO3GUI2020.Util.XML.Implementation.ComponentWriter
dataElement.Add(new XElement(_defaultNamespace + XMLNames.AirDrag_CdxA_0, _inputData.AirDragArea_0.ToXMLFormat(2)));
dataElement.Add(new XElement(_defaultNamespace + XMLNames.AirDrag_TransferredCDxA, _inputData.TransferredAirDragArea.ToXMLFormat(2)));
dataElement.Add(new XElement(_defaultNamespace + XMLNames.AirDrag_DeclaredCdxA, _inputData.AirDragArea.ToXMLFormat(2)));
}
protected override void Initialize()
......
using System.Xml.Linq;
using System.Linq;
using System.Xml.Linq;
using Castle.Core.Internal;
using TUGraz.VectoCommon.BusAuxiliaries;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Resources;
using VECTO3GUI2020.Util.XML.Interfaces;
namespace VECTO3GUI2020.Util.XML.Implementation.ComponentWriter
{
public abstract class XMLBusAuxiliariesWriter
public interface IXMLBusAuxiliariesWriter : IXMLComponentWriter
{
private readonly IBusAuxiliariesDeclarationData _inputData;
private XElement _xElement;
}
public abstract class XMLBusAuxiliariesWriter : IXMLBusAuxiliariesWriter
{
protected readonly IBusAuxiliariesDeclarationData _inputData;
protected XElement _xElement;
protected XMLBusAuxiliariesWriter(IBusAuxiliariesDeclarationData inputData)
{
......@@ -23,6 +33,12 @@ namespace VECTO3GUI2020.Util.XML.Implementation.ComponentWriter
return _xElement;
}
public XElement GetElement(XNamespace wrapperNamespace)
{
throw new System.NotImplementedException();
}
public abstract void Initialize();
public abstract void CreateElements();
......@@ -32,6 +48,8 @@ namespace VECTO3GUI2020.Util.XML.Implementation.ComponentWriter
public class XMLBusAuxiliariesWriterMultistage : XMLBusAuxiliariesWriter
{
private XNamespace _defaultNamespace;
public XMLBusAuxiliariesWriterMultistage(IBusAuxiliariesDeclarationData inputData) : base(inputData) { }
......@@ -39,12 +57,46 @@ namespace VECTO3GUI2020.Util.XML.Implementation.ComponentWriter
public override void Initialize()
{
_defaultNamespace = XMLNamespaces.V23;
_defaultNamespace = XMLNamespaces.V28;
_xElement = new XElement(_defaultNamespace + XMLNames.Component_Auxiliaries);
}
public override void CreateElements()
{
throw new System.NotImplementedException();
var dataElement = new XElement(_defaultNamespace + XMLNames.ComponentDataWrapper,
new XAttribute(XMLNamespaces.Xsi + XMLNames.Attr_Type, "CompletedVehicleAuxiliaryDataDeclarationType"));
_xElement.Add(dataElement);
if (_inputData.ElectricConsumers != null) {
var electricSystemElement = new XElement(_defaultNamespace + XMLNames.BusAux_ElectricSystem);
var ledLightsElement = new XElement(_defaultNamespace + "LEDLights");
ledLightsElement.Add(new XElement(_defaultNamespace + XMLNames.Bus_Interiorlights, _inputData.ElectricConsumers.InteriorLightsLED));
ledLightsElement.Add(new XElement(_defaultNamespace + XMLNames.Bus_Dayrunninglights, _inputData.ElectricConsumers.DayrunninglightsLED));
ledLightsElement.Add(new XElement(_defaultNamespace + XMLNames.Bus_Positionlights, _inputData.ElectricConsumers.PositionlightsLED));
ledLightsElement.Add(new XElement(_defaultNamespace + XMLNames.Bus_Brakelights, _inputData.ElectricConsumers.BrakelightsLED));
ledLightsElement.Add(new XElement(_defaultNamespace + XMLNames.Bus_Headlights, _inputData.ElectricConsumers.HeadlightsLED));
electricSystemElement.Add(ledLightsElement);
dataElement.Add(electricSystemElement);
}
if (_inputData.HVACAux != null) {
var hvacElement = new XElement(_defaultNamespace + "HVAC");
hvacElement.Add(new XElement(_defaultNamespace + XMLNames.Bus_SystemConfiguration, _inputData.HVACAux.SystemConfiguration.GetXmlFormat()));
hvacElement.Add(new XElement(_defaultNamespace + XMLNames.Bus_HeatPumpTypeDriver, _inputData.HVACAux.HeatPumpTypeDriverCompartment.GetLabel()));
hvacElement.Add(new XElement(_defaultNamespace + XMLNames.Bus_HeatPumpModeDriver, _inputData.HVACAux.HeatPumpModeDriverCompartment?.GetLabel()));
hvacElement.Add(new XElement(_defaultNamespace + XMLNames.Bus_HeatPumpTypePassenger, _inputData.HVACAux.HeatPumpTypePassengerCompartment?.GetLabel()));
hvacElement.Add(new XElement(_defaultNamespace + XMLNames.Bus_HeatPumpModePassenger, _inputData.HVACAux.HeatPumpModePassengerCompartment?.GetLabel()));
hvacElement.Add(new XElement(_defaultNamespace + XMLNames.Bus_AuxiliaryHeaterPower, _inputData.HVACAux.AuxHeaterPower?.ToXMLFormat(0)));
hvacElement.Add(new XElement(_defaultNamespace + XMLNames.Bus_DoubleGlazing, _inputData.HVACAux.DoubleGlazing));
hvacElement.Add(new XElement(_defaultNamespace + XMLNames.Bus_AdjustableAuxiliaryHeater, _inputData.HVACAux.AdjustableAuxiliaryHeater));
hvacElement.Add(new XElement(_defaultNamespace + XMLNames.Bus_SeparateAirDistributionDucts, _inputData.HVACAux.SeparateAirDistributionDucts));
hvacElement.Add(new XElement(_defaultNamespace + XMLNames.Bus_WaterElectricHeater, _inputData.HVACAux.WaterElectricHeater));
hvacElement.Add(new XElement(_defaultNamespace + XMLNames.Bus_AirElectricHeater, _inputData.HVACAux.AirElectricHeater));
hvacElement.Add(new XElement(_defaultNamespace + XMLNames.Bus_OtherHeatingTechnology, _inputData.HVACAux.OtherHeatingTechnology));
dataElement.Add(hvacElement);
}
}
#endregion
......
......@@ -192,7 +192,7 @@ namespace VECTO3GUI2020.Util.XML.Implementation
public class XMLVehicleWriter_v2_8 : XMLVehicleWriter
{
public new static readonly string[] SUPPORTEDVERSIONS = {
public static readonly string[] SUPPORTEDVERSIONS = {
typeof(DeclarationInterimStageBusVehicleViewModel_v2_8).ToString()
};
public XMLVehicleWriter_v2_8(IVehicleDeclarationInputData inputData, IXMLWriterFactory xmlWriterFactory) : base(inputData, xmlWriterFactory)
......@@ -277,18 +277,27 @@ namespace VECTO3GUI2020.Util.XML.Implementation
if (_inputData.Components != null) {
var componentElement = new XElement(
_defaultNamespace + XMLNames.Vehicle_Components,
new XAttribute(XMLNamespaces.Xsi + XMLNames.Components_type_attr,
new XAttribute(XMLNamespaces.Xsi + XMLNames.Attr_Type,
"CompletedVehicleComponentsDeclarationType"));
//Airdrag
if (_inputData.Components.AirdragInputData != null) {
var airDragElement = _xmlWriterFactory.CreateComponentWriter(_inputData.Components.AirdragInputData)
.GetElement();
var tempAirDragElement = new XElement(_defaultNamespace + XMLNames.Component_AirDrag);
airDragElement.Name = tempAirDragElement.Name;
componentElement.Add(airDragElement);
}
//auxiliaries
if (_inputData.Components.BusAuxiliaries != null) {
var auxiliaryElement = _xmlWriterFactory.CreateBuxAuxiliariesWriter(_inputData.Components.BusAuxiliaries)
.GetElement();
componentElement.Add(auxiliaryElement);
}
_Xelement.Add(componentElement);
......
......@@ -2,6 +2,7 @@
using TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Interfaces;
using TUGraz.VectoCore.OutputData.XML.Engineering.Interfaces;
using TUGraz.VectoCore.OutputData.XML.Engineering.Writer;
using VECTO3GUI2020.Util.XML.Implementation.ComponentWriter;
namespace VECTO3GUI2020.Util.XML.Interfaces
{
......@@ -17,5 +18,7 @@ namespace VECTO3GUI2020.Util.XML.Interfaces
IXMLComponentWriter CreateComponentWriter(IPTOTransmissionInputData inputData);
IXMLComponentsWriter CreateComponentsWriter(IVehicleComponentsDeclaration inputData);
IXMLBusAuxiliariesWriter CreateBuxAuxiliariesWriter(IBusAuxiliariesDeclarationData inputData);
}
}
......@@ -84,10 +84,6 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
_consolidatedManufacturingStageInputData = consolidatedManufacturingStageInputData;
VehicleViewModel = (IMultistageVehicleViewModel)_viewModelFactory.GetInterimStageVehicleViewModel(consolidatedManufacturingStageInputData.Vehicle);
CurrentView = VehicleViewModel as IViewModelBase;
......
......@@ -54,6 +54,7 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
get
{
return _saveVifCommand ?? new RelayCommand(() => {
SaveVIF(this);
}, () => true);
}
......@@ -61,6 +62,8 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
private static void SaveVIF(IMultistageVIFInputData inputData)
{
var vifInputData = inputData;
}
......@@ -106,7 +109,12 @@ namespace VECTO3GUI2020.ViewModel.MultiStage.Implementation
Debug.WriteLine(xElement.CreateWrapperDocument(XMLNamespaces.V28).ToString());
var validator = new XMLValidator(xDoc.ToXmlDocument());
var valid = validator.ValidateXML(XmlDocumentType.DeclarationJobData);
var valid = false;
try {
valid = validator.ValidateXML(XmlDocumentType.DeclarationJobData);
} catch (Exception e) {
_dialogHelper.Value.ShowMessageBox(e.Message, "Error");
}
if (!valid) {
_dialogHelper.Value.ShowMessageBox($"Invalid Document: {validator.ValidationError}", "Error");
xDoc.Save(filename, SaveOptions.OmitDuplicateNamespaces);
......
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Vecto3GUITest")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Vecto3GUITest")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("31248c1a-85a9-4d4c-9ddb-0d56e1599c7e")]
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Threading;
using OpenQA.Selenium;
namespace Vecto3GUITest
{
[TestClass]
public class StartUpScenario : VECTO3GUI2020Session
{
[TestMethod]
public void LoadFile()
{
//session.FindElementByAccessibilityId("Register").FindElementByClassName("Button").Click();
session.FindElementByName("New Multistage File").Click();
}
[ClassInitialize]
public static void ClassInitialize(TestContext context)
{
Setup(context);
}
[ClassCleanup]
public static void ClassCleanup()
{
TearDown();
}
}
}
using Microsoft.VisualStudio.TestTools.UnitTesting;
using OpenQA.Selenium.Appium.Windows;
using OpenQA.Selenium.Remote;
using OpenQA.Selenium;
using System;
using OpenQA.Selenium.Appium;
namespace Vecto3GUITest
{
[TestClass]
public class VECTO3GUI2020Session
{
protected const string WindowsApplicationDriverUrl = "http://127.0.0.1:4723";
private const string NotepadAppId = @"C:\Windows\System32\notepad.exe";
protected static WindowsDriver<WindowsElement> session;
public static void Setup(TestContext context)
{
// Launch a new instance of Notepad application
if (session == null)
{
// Create a new session to launch Notepad application
var appiumOptions = new OpenQA.Selenium.Appium.AppiumOptions();
appiumOptions.AddAdditionalCapability("app", @"C:\Users\Harry\source\repos\vecto-dev\VECTO3GUI2020\bin\Debug\VECTO3GUI2020.exe");
appiumOptions.AddAdditionalCapability("deviceName", "WindowsPC");
session = new WindowsDriver<WindowsElement>(new Uri("http://127.0.0.1:4723"), appiumOptions);
// Use the session to control the app
Assert.IsNotNull(session);
Assert.IsNotNull(session.SessionId);
// Set implicit timeout to 1.5 seconds to make element search to retry every 500 ms for at most three times
session.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);
}
}
public static void TearDown()
{
// Close the application and delete the session
if (session != null)
{
session.Close();
session.Quit();
session = null;
}
}
[TestInitialize]
public void TestInitialize()
{
// Select all text and delete to clear the edit box
}
protected static string SanitizeBackslashes(string input) => input.Replace("\\", Keys.Alt + Keys.NumberPad9 + Keys.NumberPad2 + Keys.Alt);
}
}
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\MSTest.TestAdapter.2.2.3\build\net45\MSTest.TestAdapter.props" Condition="Exists('..\packages\MSTest.TestAdapter.2.2.3\build\net45\MSTest.TestAdapter.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{31248C1A-85A9-4D4C-9DDB-0D56E1599C7E}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Vecto3GUITest</RootNamespace>
<AssemblyName>Vecto3GUITest</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
<IsCodedUITest>False</IsCodedUITest>
<TestProjectType>UnitTest</TestProjectType>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Appium.Net, Version=4.3.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Appium.WebDriver.4.3.1\lib\net45\Appium.Net.dll</HintPath>
</Reference>
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.4.4.1\lib\net45\Castle.Core.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\MSTest.TestFramework.2.2.3\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\MSTest.TestFramework.2.2.3\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Ninject">
<HintPath>..\..\..\..\.nuget\packages\ninject\3.3.4\lib\net45\Ninject.dll</HintPath>
</Reference>
<Reference Include="SeleniumExtras.PageObjects, Version=3.11.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DotNetSeleniumExtras.PageObjects.3.11.0\lib\net45\SeleniumExtras.PageObjects.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="WebDriver, Version=3.141.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Selenium.WebDriver.3.141.0\lib\net45\WebDriver.dll</HintPath>
</Reference>
<Reference Include="WebDriver.Support, Version=3.141.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Selenium.Support.3.141.0\lib\net45\WebDriver.Support.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="UITests.cs" />
<Compile Include="VECTO3GUI2020Session.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="XMLWriterTest.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\VectoCore\VectoCore\VectoCore.csproj">
<Project>{CD36938A-ADD9-4C65-96DA-B397CDEEA90A}</Project>
<Name>VectoCore</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.2.2.3\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.2.2.3\build\net45\MSTest.TestAdapter.props'))" />
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.2.2.3\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.2.2.3\build\net45\MSTest.TestAdapter.targets'))" />
</Target>
<Import Project="..\packages\MSTest.TestAdapter.2.2.3\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.2.2.3\build\net45\MSTest.TestAdapter.targets')" />
</Project>
\ No newline at end of file
using System.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Ninject;
using TUGraz.VectoCore;
using TUGraz.VectoCore.InputData.FileIO.XML;
namespace Vecto3GUITest
{
[TestClass]
public class WriterTests
{
private StandardKernel _kernel;
private IXMLInputDataReader _xmlInputReader;
public void Setup()
{
_kernel = new StandardKernel(new VectoNinjectModule());
_xmlInputReader = _kernel.Get<IXMLInputDataReader>();
}
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Ninject" publicKeyToken="c7192dc5380945e7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.3.4.0" newVersion="3.3.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Appium.WebDriver" version="4.3.1" targetFramework="net48" />
<package id="Castle.Core" version="4.4.1" targetFramework="net48" />
<package id="DotNetSeleniumExtras.PageObjects" version="3.11.0" targetFramework="net48" />
<package id="MSTest.TestAdapter" version="2.2.3" targetFramework="net48" />
<package id="MSTest.TestFramework" version="2.2.3" targetFramework="net48" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
<package id="Ninject" version="3.3.4" targetFramework="net48" />
<package id="Selenium.Support" version="3.141.0" targetFramework="net48" />
<package id="Selenium.WebDriver" version="3.141.0" targetFramework="net48" />
</packages>
\ No newline at end of file
......@@ -244,6 +244,15 @@ namespace TUGraz.VectoCommon.BusAuxiliaries
default: return null;
}
}
public static string GetLabel(this HeatPumpType? type)
{
if (type.HasValue) {
return type.Value.GetLabel();
} else {
return null;
}
}
}
......
......@@ -4,7 +4,7 @@
<Manufacturer>Some Manufacturer</Manufacturer>
<ManufacturerAddress>Some Manufacturer Address</ManufacturerAddress>
<VIN>VEH-1234567890</VIN>
<Date>2021-05-01T22:00:00Z</Date>
<Date>2021-05-02T22:00:00Z</Date>
<Model>Sample Bus Model</Model>
<LegislativeCategory>M3</LegislativeCategory>
<CorrectedActualMass>500</CorrectedActualMass>
......@@ -14,10 +14,6 @@
<ClassBus>II+III</ClassBus>
<VehicleCode>CB</VehicleCode>
<LowEntry>false</LowEntry>
<HeightIntegratedBody>2500</HeightIntegratedBody>
<VehicleLength>9500</VehicleLength>
<VehicleWidth>2500</VehicleWidth>
<EntranceHeight>2000</EntranceHeight>
<DoorDriveTechnology>electric</DoorDriveTechnology>
<DeclarationType>interim</DeclarationType>
<ADAS>
......@@ -26,5 +22,33 @@
<v2.3:EcoRollWithEngineStop>false</v2.3:EcoRollWithEngineStop>
<v2.3:PredictiveCruiseControl>none</v2.3:PredictiveCruiseControl>
</ADAS>
<Components xsi:type="CompletedVehicleComponentsDeclarationType">
<Auxiliaries>
<Data xsi:type="CompletedVehicleAuxiliaryDataDeclarationType">
<ElectricSystem>
<LEDLights>
<Interiorlights>false</Interiorlights>
<Dayrunninglights>true</Dayrunninglights>
<Positionlights>true</Positionlights>
<Brakelights>true</Brakelights>
<Headlights>false</Headlights>
</LEDLights>
</ElectricSystem>
<HVAC>
<SystemConfiguration>0</SystemConfiguration>
<HeatPumpTypeDriverCompartment>none</HeatPumpTypeDriverCompartment>
<HeatPumpModeDriverCompartment>heating</HeatPumpModeDriverCompartment>
<HeatPumpTypePassengerCompartment>non R-744 2-stage</HeatPumpTypePassengerCompartment>
<HeatPumpModePassengerCompartment>cooling</HeatPumpModePassengerCompartment>
<AuxiliaryHeaterPower>50</AuxiliaryHeaterPower>
<DoubleGlazing>false</DoubleGlazing>
<AdjustableAuxiliaryHeater>true</AdjustableAuxiliaryHeater>
<WaterElectricHeater>true</WaterElectricHeater>
<AirElectricHeater>false</AirElectricHeater>
<OtherHeatingTechnology>false</OtherHeatingTechnology>
</HVAC>
</Data>
</Auxiliaries>
</Components>
</v2.0:Vehicle>
</tns:VectoInputDeclaration>
\ No newline at end of file
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