-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor XML validation into a class (#214)
Previously, we only had a single static function that read the XML schema on every XML validation. This change refactors the validation into a separate class so that the schema does not have to be reloaded. This is practical for validating a large number of XML samples. We implement a table-driven test of the validation based on the XML files directly extracted from the AASXs obtained from http://admin-shell-io.com/samples/. The tests revealed an inconsistency between our logic and "official" AAS XSD schema. The problem could be fixed by "fixing" the XML and moving the sequence of `AssetIdentificationModelRef` to the end of XML serialization logic of an asset.
- Loading branch information
Showing
26 changed files
with
105,357 additions
and
732 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?xml version="1.0" encoding="utf-8" standalone="no"?> | ||
<test-run id="0" runstate="Runnable" testcasecount="13" result="Passed" total="1" passed="1" failed="0" inconclusive="0" skipped="0" asserts="0" engine-version="3.11.1.0" clr-version="4.0.30319.42000" start-time="2020-09-29 08:11:39Z" end-time="2020-09-29 08:11:43Z" duration="3.657159"> | ||
<command-line><![CDATA["C:\MIHO\Develop\Aasx\aasx-package-explorer\tools\NUnit.ConsoleRunner.3.11.1\tools\nunit3-console.exe" artefacts/build/Debug/AasxCsharpLibrary.Tests.dll --test=AdminShellNS.Tests.TestLoadSaveChain.TestLoadSaveXmlValidate]]></command-line> | ||
<filter> | ||
<test>AdminShellNS.Tests.TestLoadSaveChain.TestLoadSaveXmlValidate</test> | ||
</filter> | ||
<test-suite type="Assembly" id="0-1018" name="AasxCsharpLibrary.Tests.dll" fullname="C:\MIHO\Develop\Aasx\aasx-package-explorer\artefacts\build\Debug\AasxCsharpLibrary.Tests.dll" runstate="Runnable" testcasecount="13" result="Passed" start-time="2020-09-29 08:11:40Z" end-time="2020-09-29 08:11:43Z" duration="2.386909" total="1" passed="1" failed="0" warnings="0" inconclusive="0" skipped="0" asserts="0"> | ||
<environment framework-version="3.12.0.0" clr-version="4.0.30319.42000" os-version="Microsoft Windows NT 10.0.17134.0" platform="Win32NT" cwd="C:\MIHO\Develop\Aasx\aasx-package-explorer" machine-name="CDE86488" user="miho" user-domain="FESTO" culture="de-DE" uiculture="de-DE" os-architecture="x64" /> | ||
<settings> | ||
<setting name="DisposeRunners" value="True" /> | ||
<setting name="WorkDirectory" value="C:\MIHO\Develop\Aasx\aasx-package-explorer" /> | ||
<setting name="ImageRuntimeVersion" value="4.0.30319" /> | ||
<setting name="ImageTargetFrameworkName" value=".NETFramework,Version=v4.6.1" /> | ||
<setting name="ImageRequiresX86" value="False" /> | ||
<setting name="ImageRequiresDefaultAppDomainAssemblyResolver" value="False" /> | ||
<setting name="RuntimeFramework" value="net-4.0" /> | ||
<setting name="NumberOfTestWorkers" value="4" /> | ||
</settings> | ||
<properties> | ||
<property name="_PID" value="6440" /> | ||
<property name="_APPDOMAIN" value="domain-" /> | ||
</properties> | ||
<test-suite type="TestSuite" id="0-1019" name="AdminShellNS" fullname="AdminShellNS" runstate="Runnable" testcasecount="13" result="Passed" start-time="2020-09-29 08:11:40Z" end-time="2020-09-29 08:11:43Z" duration="2.364843" total="1" passed="1" failed="0" warnings="0" inconclusive="0" skipped="0" asserts="0"> | ||
<test-suite type="TestSuite" id="0-1020" name="Tests" fullname="AdminShellNS.Tests" runstate="Runnable" testcasecount="13" result="Passed" start-time="2020-09-29 08:11:40Z" end-time="2020-09-29 08:11:43Z" duration="2.364241" total="1" passed="1" failed="0" warnings="0" inconclusive="0" skipped="0" asserts="0"> | ||
<test-suite type="TestFixture" id="0-1012" name="TestLoadSaveChain" fullname="AdminShellNS.Tests.TestLoadSaveChain" classname="AdminShellNS.Tests.TestLoadSaveChain" runstate="Runnable" testcasecount="2" result="Passed" start-time="2020-09-29 08:11:40Z" end-time="2020-09-29 08:11:43Z" duration="2.358844" total="1" passed="1" failed="0" warnings="0" inconclusive="0" skipped="0" asserts="0"> | ||
<test-case id="0-1015" name="TestLoadSaveXmlValidate" fullname="AdminShellNS.Tests.TestLoadSaveChain.TestLoadSaveXmlValidate" methodname="TestLoadSaveXmlValidate" classname="AdminShellNS.Tests.TestLoadSaveChain" runstate="Runnable" seed="2101435676" result="Passed" start-time="2020-09-29 08:11:40Z" end-time="2020-09-29 08:11:42Z" duration="2.342831" asserts="0" /> | ||
</test-suite> | ||
</test-suite> | ||
</test-suite> | ||
</test-suite> | ||
</test-run> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.