Skip to content

Commit

Permalink
Import simple NodeSet2 file is incomplete #510
Browse files Browse the repository at this point in the history
- added Unit test against model in concern
- UT 👍 - no unexpected errors reported
  • Loading branch information
mpostol committed Feb 8, 2021
1 parent 8542d9d commit cf8484d
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@
<None Include="XMLModels\ProblemsToReport\ADI#509\Opc.Ua.Adi.NodeSet2.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Content Include="XMLModels\ProblemsToReport\eoursel510\Opc.Ua.NodeSet2.TriCycleType_V1.1.xml" />
<None Include="XMLModels\ProblemsToReport\eoursel510\Opc.Ua.NodeSet2.TriCycleType_V1.1.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<Content Include="XMLModels\ProblemsToReport\fgolra177\Opc.Ua.Semi.NodeSet2.xml" />
<Content Include="XMLModels\ProblemsToReport\fgolra177\OpcUaGemModel.xml" />
<Content Include="XMLModels\ProblemsToReport\MachineVision\Opc.Ua.MachineVision.ModelDesign.xml" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,22 @@ public void ADITest()
foreach (TraceMessage item in focusNonCategorized)
Debug.WriteLine(item.ToString());
}
[TestMethod]
public void eoursel510Test()
{

FileInfo _testDataFileInfo = new FileInfo(@"ProblemsToReport\eoursel510\Opc.Ua.NodeSet2.TriCycleType_V1.1.xml");
Assert.IsTrue(_testDataFileInfo.Exists);
List<TraceMessage> _trace = new List<TraceMessage>();
IAddressSpaceContext _as = new AddressSpaceContext(z => _trace.Add(z));
_as.ImportUANodeSet(_testDataFileInfo);
//Extensions is omitted during the import
Assert.AreEqual<int>(10, _trace.Where<TraceMessage>(x => x.BuildError.Focus == Focus.Diagnostic).Count<TraceMessage>());
Assert.AreEqual<int>(1, _trace.Where<TraceMessage>(x => x.BuildError.Focus == Focus.XML).Count<TraceMessage>());
_as.ValidateAndExportModel();
Assert.AreEqual<int>(13, _trace.Where<TraceMessage>(x => x.BuildError.Focus == Focus.Diagnostic).Count<TraceMessage>());
Assert.AreEqual<int>(1, _trace.Where<TraceMessage>(x => x.BuildError.Focus == Focus.XML).Count<TraceMessage>());

}
}
}
47 changes: 25 additions & 22 deletions SemanticData/UANodeSetValidation/XML/ClassDiagram.cd
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
<Compartments>
<Compartment Name="Fields" Collapsed="true" />
<Compartment Name="Properties" Collapsed="true" />
<Compartment Name="Methods" Collapsed="true" />
</Compartments>
<TypeIdentifier>
<HashCode>AEACEACCAAAkAAgAAINQAAAAACBQEAAAAAgAAAAAAAA=</HashCode>
<FileName>XML\UANodeSet.cs</FileName>
<HashCode>AEADECiCAACkACgAwJNQIAEIBCBUEIAAEBiAAgAECjA=</HashCode>
<FileName>XML\UANode.cs</FileName>
</TypeIdentifier>
<ShowAsAssociation>
<Property Name="References" />
</ShowAsAssociation>
<Lollipop Position="0.2" />
</Class>
<Class Name="UAOOI.SemanticData.UANodeSetValidation.XML.UAType" Collapsed="true">
<Position X="4.5" Y="3.75" Width="1.5" />
Expand All @@ -21,70 +23,70 @@
<Compartment Name="Methods" Collapsed="true" />
</Compartments>
<TypeIdentifier>
<HashCode>AAAAAAAAABAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<HashCode>AAAAAAAAABCAAAAAACAAAAAAAAAAAAAAAAAAAAAEAAA=</HashCode>
<FileName>XML\UANodeSet.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="UAOOI.SemanticData.UANodeSetValidation.XML.UAInstance" Collapsed="true">
<Position X="4.5" Y="0.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAIAAAAAAAA=</HashCode>
<FileName>XML\UANodeSet.cs</FileName>
<HashCode>AAAAAAAAAACAAAAAAABAAAAAAAAAAAQAAAIAAAAEAAA=</HashCode>
<FileName>XML\UAInstance.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="UAOOI.SemanticData.UANodeSetValidation.XML.UAReferenceType" Collapsed="true">
<Position X="1.25" Y="5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAIAAAAAAAAAAAAACAgAAAAAAAEAA=</HashCode>
<HashCode>AAAAAAAAAAAAAAAAIAAAAAAAAAAAAACAgBAAAAAAEAA=</HashCode>
<FileName>XML\UANodeSet.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="UAOOI.SemanticData.UANodeSetValidation.XML.UADataType" Collapsed="true">
<Position X="3.5" Y="5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAACAAAAAAAAQAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>XML\UANodeSet.cs</FileName>
<HashCode>AAAAAAAAAAAACAAAAAAAAQAABAAAAAAAIBAAAAAEAAA=</HashCode>
<FileName>XML\UADataType.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="UAOOI.SemanticData.UANodeSetValidation.XML.UAVariableType" Collapsed="true">
<Position X="5.75" Y="5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAEAAAAAAIAAIAAAAAAAAAAAAQCAAAAAAAgIAAACAA=</HashCode>
<HashCode>AAAEAAAAAAIAAIAAAAAAAAAAAAQCAAAAABAgIAAECAA=</HashCode>
<FileName>XML\UANodeSet.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="UAOOI.SemanticData.UANodeSetValidation.XML.UAObjectType" Collapsed="true">
<Position X="8" Y="5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAA=</HashCode>
<FileName>XML\UANodeSet.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="UAOOI.SemanticData.UANodeSetValidation.XML.UAView" Collapsed="true">
<Position X="1.25" Y="2" Width="1.5" />
<TypeIdentifier>
<HashCode>AQAAAAAAAAAAAAAAAACAIAAAAAAAAAAAAAABAAAAAAA=</HashCode>
<HashCode>AQAAAAAAAACAAAAAAACAIAAAAAAAAAAAABABAAAAAAA=</HashCode>
<FileName>XML\UANodeSet.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="UAOOI.SemanticData.UANodeSetValidation.XML.UAMethod" Collapsed="true">
<Position X="3.5" Y="2" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAgAABACAAAAADAAAAAACAAA=</HashCode>
<FileName>XML\UANodeSet.cs</FileName>
<HashCode>AAAAAAAAQCCAAAAAAAAAAgAABACAAAAADBAAAAAGAAA=</HashCode>
<FileName>XML\UAMethod.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="UAOOI.SemanticData.UANodeSetValidation.XML.UAVariable" Collapsed="true">
<Position X="5.75" Y="2" Width="1.5" />
<TypeIdentifier>
<HashCode>ABgEAAAQAAIAgIACAAAAAAAAAGQiAAAQAAAgIAAACAQ=</HashCode>
<HashCode>ABgEAAAQAAKAgIACQAAAAAAAAGQiAAAQABAgIAAECAQ=</HashCode>
<FileName>XML\UANodeSet.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="UAOOI.SemanticData.UANodeSetValidation.XML.UAObject" Collapsed="true">
<Position X="8" Y="2" Width="1.5" />
<TypeIdentifier>
<HashCode>AQAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<HashCode>AQAAAAAAAACAAAAAAACAAAAAAAAAAAAAABAAAAAAAAA=</HashCode>
<FileName>XML\UANodeSet.cs</FileName>
</TypeIdentifier>
</Class>
Expand All @@ -94,19 +96,19 @@
<Compartment Name="Fields" Collapsed="true" />
</Compartments>
<TypeIdentifier>
<HashCode>IBABQgCIAABICAAAAEECAAACAABAAAAAEAkAAAAAAAI=</HashCode>
<FileName>XML\UANodeSet.Utils.cs</FileName>
<HashCode>ABABQgCIAAAICAACAAECAAACAEBAAAAAAAkAAAAEAAI=</HashCode>
<FileName>XML\UANodeSet.cs</FileName>
</TypeIdentifier>
<ShowAsAssociation>
<Property Name="Items" />
<Property Name="Aliases" />
<Property Name="Items" />
</ShowAsAssociation>
</Class>
<Class Name="UAOOI.SemanticData.UANodeSetValidation.XML.NodeIdAlias" Collapsed="true">
<Position X="15.25" Y="0.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAIAAAAAAAAAAAAAAAAKAAAAAAAgAAAAAAA=</HashCode>
<FileName>XML\UANodeSet.cs</FileName>
<HashCode>AAAAAAAAAAIAAAAAAAAAAAAAAAAKAAAAAAAgAAAEAAA=</HashCode>
<FileName>XML\NodeIdAlias.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="UAOOI.SemanticData.UANodeSetValidation.XML.Reference" Collapsed="true">
Expand All @@ -116,9 +118,10 @@
<Compartment Name="Methods" Collapsed="true" />
</Compartments>
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAEAAAACAABAAAACAAAAAAAgAAAIAAA=</HashCode>
<FileName>XML\UANodeSet.cs</FileName>
<HashCode>AAAAAAAAAAAAAAEEgAACAABAAAACAAAAAAAgAAAMAAA=</HashCode>
<FileName>XML\Reference.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Font Name="Segoe UI" Size="9" />
</ClassDiagram>

0 comments on commit cf8484d

Please sign in to comment.