From c78cfe9c6717b1655cb1a22ae0f67f2023640d09 Mon Sep 17 00:00:00 2001 From: MPostol Date: Wed, 6 Apr 2022 15:27:58 +0200 Subject: [PATCH 1/2] Update models to harmonize with current UA-ModelCompiler release #655 - Recovered model using asp version: 6.5.3-Mike --- .../Models/DataTypeTest.asp.xml | 68 +++++++++---------- .../Models/DataTypeTest/asp.log | 37 ++++++++++ .../Models/DataTypeTest/asp.warnings.log | 7 ++ .../Models/DoRecoverModelDesign.cmd | 24 +++---- .../Models/ObjectTypeTest.asp.xml | 22 +++--- .../Models/ObjectTypeTest/asp.log | 24 +++++++ .../Models/ObjectTypeTest/asp.warnings.log | 7 ++ .../Models/ReferenceTest.asp.xml | 8 +-- .../Models/ReferenceTest/asp.log | 19 ++++++ .../Models/ReferenceTest/asp.warnings.log | 7 ++ .../Models/VariableTypeTest.asp.xml | 16 ++--- .../Models/VariableTypeTest/asp.log | 19 ++++++ .../Models/VariableTypeTest/asp.warnings.log | 7 ++ 13 files changed, 194 insertions(+), 71 deletions(-) create mode 100644 SemanticData/UAModelDesignExport.UnitTest/Models/DataTypeTest/asp.log create mode 100644 SemanticData/UAModelDesignExport.UnitTest/Models/DataTypeTest/asp.warnings.log create mode 100644 SemanticData/UAModelDesignExport.UnitTest/Models/ObjectTypeTest/asp.log create mode 100644 SemanticData/UAModelDesignExport.UnitTest/Models/ObjectTypeTest/asp.warnings.log create mode 100644 SemanticData/UAModelDesignExport.UnitTest/Models/ReferenceTest/asp.log create mode 100644 SemanticData/UAModelDesignExport.UnitTest/Models/ReferenceTest/asp.warnings.log create mode 100644 SemanticData/UAModelDesignExport.UnitTest/Models/VariableTypeTest/asp.log create mode 100644 SemanticData/UAModelDesignExport.UnitTest/Models/VariableTypeTest/asp.warnings.log diff --git a/SemanticData/UAModelDesignExport.UnitTest/Models/DataTypeTest.asp.xml b/SemanticData/UAModelDesignExport.UnitTest/Models/DataTypeTest.asp.xml index 9b27ee1e..85c09511 100644 --- a/SemanticData/UAModelDesignExport.UnitTest/Models/DataTypeTest.asp.xml +++ b/SemanticData/UAModelDesignExport.UnitTest/Models/DataTypeTest.asp.xml @@ -1,24 +1,22 @@  - + - http://opcfoundation.org/UA/ - http://cas.eu/UA/CommServer/UnitTests/DataTypeTest + http://opcfoundation.org/UA/ + http://cas.eu/UA/CommServer/UnitTests/DataTypeTest - + - + - - - Field1 - - - - Field2 - - + + Field1 + + + Field2 + + @@ -28,28 +26,26 @@ - + Enumeration DataType derived from abstract type - + - - - i=7616 - - - - 1 - - - Field3 - - - - - - + + + i=7616 + + + + 1 + + Field3 + + + + + @@ -58,17 +54,17 @@ - + Abstract structure - + - + - + Derived from Number diff --git a/SemanticData/UAModelDesignExport.UnitTest/Models/DataTypeTest/asp.log b/SemanticData/UAModelDesignExport.UnitTest/Models/DataTypeTest/asp.log new file mode 100644 index 00000000..eed6c085 --- /dev/null +++ b/SemanticData/UAModelDesignExport.UnitTest/Models/DataTypeTest/asp.log @@ -0,0 +1,37 @@ +"AddressSpacePrototyping";Information;1637887218;;"Address Space Prototyping (asp.exe) Version 6.5.3.25316";;;;"2022-04-06T13:18:36.9343563Z";; +"AddressSpacePrototyping";Information;1637887219;;"Copyright(c) 2022 Mariusz Postol";;;;"2022-04-06T13:18:36.9353565Z";; +"AddressSpacePrototyping";Verbose;6710129;;"Creating Address Space populated using Standard Model. It will take a while ...";;;;"2022-04-06T13:18:37.0306935Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information Entering AddressSpaceContext creator - starting creation the OPC UA Address Space.";;;;"2022-04-06T13:18:37.0467191Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information Address Space - the OPC UA defined has been uploaded.";;;;"2022-04-06T13:18:37.2783834Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information Finished import UANodeSet for http://opcfoundation.org/UA/; Imported 4071 nodes.";;;;"2022-04-06T13:19:46.7118577Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information Address Space - has bee created successfully.";;;;"2022-04-06T13:19:46.7118577Z";; +"AddressSpacePrototyping";Verbose;1637887216;;"Importing UANodeSet document from file C:\VS.git\github.mpostol\OPC-UA-OOI\SemanticData\UAModelDesignExport.UnitTest\Models\DataTypeTest\DataTypeTest.NodeSet2.xml";;;;"2022-04-06T13:19:46.7118577Z";; +"UANodeSetValidation";Information;190380256;;"Entering ImportUANodeSet and starting model import form file DataTypeTest.NodeSet2.xml";;;;"2022-04-06T13:19:46.7118577Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information Finished import UANodeSet for http://cas.eu/UA/CommServer/UnitTests/DataTypeTest; Imported 22 nodes.";;;;"2022-04-06T13:19:47.3084359Z";; +"AddressSpacePrototyping";Verbose;1637887217;;"Validating and exporting a model from namespace http://cas.eu/UA/CommServer/UnitTests/DataTypeTest";;;;"2022-04-06T13:19:47.3084359Z";; +"UANodeSetValidation";Information;856488909;;"Entering IAddressSpaceContext.ValidateAndExportModel - starting for the http://cas.eu/UA/CommServer/UnitTests/DataTypeTest namespace.";;;;"2022-04-06T13:19:47.3094364Z";; +"UANodeSetValidation";Verbose;938023414;;"Selected 4 types to be validated.";;;;"2022-04-06T13:19:47.3284420Z";; +"UANodeSetValidation";Verbose;863907859;;"Selected 0 instances referenced by the ObjectsFolder to be validated.";;;;"2022-04-06T13:19:47.3285426Z";; +"UANodeSetValidation";Information;1606585634;;"Do Validator.ValidateExportModel - now the model contains 4 nodes";;;;"2022-04-06T13:19:47.3285426Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information Removed the graph of nodes at http://opcfoundation.org/UA/:HasEncoding from the model";;;;"2022-04-06T13:19:47.3536885Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information Removed the graph of nodes at http://opcfoundation.org/UA/:HasEncoding from the model";;;;"2022-04-06T13:19:47.3536885Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information 1594962400 - Finishing Validator.ValidateExportModel - the NodeId=""ns=1;i=18"", BrowseName=""Default Binary"", ModellingRule="""" is not added to the exported model";;;;"2022-04-06T13:19:47.3536885Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information 1594962400 - Finishing Validator.ValidateExportModel - the NodeId=""ns=1;i=19"", BrowseName=""1:AbstractStructure"", ModellingRule="""" is not added to the exported model";;;;"2022-04-06T13:19:47.3536885Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information 1594962400 - Finishing Validator.ValidateExportModel - the NodeId=""ns=1;i=27"", BrowseName=""Default Binary"", ModellingRule="""" is not added to the exported model";;;;"2022-04-06T13:19:47.3536885Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information 1594962400 - Finishing Validator.ValidateExportModel - the NodeId=""ns=1;i=28"", BrowseName=""1:DerivedStructure"", ModellingRule="""" is not added to the exported model";;;;"2022-04-06T13:19:47.3536885Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information 1594962400 - Finishing Validator.ValidateExportModel - the NodeId=""ns=1;i=5"", BrowseName=""1:DataTypeTest"", ModellingRule="""" is not added to the exported model";;;;"2022-04-06T13:19:47.3536885Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information 1594962400 - Finishing Validator.ValidateExportModel - the NodeId=""ns=1;i=7"", BrowseName=""NamespaceUri"", ModellingRule="""" is not added to the exported model";;;;"2022-04-06T13:19:47.3536885Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information 1594962400 - Finishing Validator.ValidateExportModel - the NodeId=""ns=1;i=1"", BrowseName=""Deprecated"", ModellingRule="""" is not added to the exported model";;;;"2022-04-06T13:19:47.3536885Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information 1594962400 - Finishing Validator.ValidateExportModel - the NodeId=""ns=1;i=14"", BrowseName=""Default XML"", ModellingRule="""" is not added to the exported model";;;;"2022-04-06T13:19:47.3536885Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information 1594962400 - Finishing Validator.ValidateExportModel - the NodeId=""ns=1;i=15"", BrowseName=""1:AbstractStructure"", ModellingRule="""" is not added to the exported model";;;;"2022-04-06T13:19:47.3536885Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information 1594962400 - Finishing Validator.ValidateExportModel - the NodeId=""ns=1;i=23"", BrowseName=""Default XML"", ModellingRule="""" is not added to the exported model";;;;"2022-04-06T13:19:47.3536885Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information 1594962400 - Finishing Validator.ValidateExportModel - the NodeId=""ns=1;i=24"", BrowseName=""1:DerivedStructure"", ModellingRule="""" is not added to the exported model";;;;"2022-04-06T13:19:47.3536885Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information 1594962400 - Finishing Validator.ValidateExportModel - the NodeId=""ns=1;i=2"", BrowseName=""1:DataTypeTest"", ModellingRule="""" is not added to the exported model";;;;"2022-04-06T13:19:47.3536885Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information 1594962400 - Finishing Validator.ValidateExportModel - the NodeId=""ns=1;i=4"", BrowseName=""NamespaceUri"", ModellingRule="""" is not added to the exported model";;;;"2022-04-06T13:19:47.3536885Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information 1594962400 - Finishing Validator.ValidateExportModel - the NodeId=""ns=1;i=8"", BrowseName=""Deprecated"", ModellingRule="""" is not added to the exported model";;;;"2022-04-06T13:19:47.3536885Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information 1594962400 - Finishing Validator.ValidateExportModel - the NodeId=""ns=1;i=31"", BrowseName=""Default JSON"", ModellingRule="""" is not added to the exported model";;;;"2022-04-06T13:19:47.3536885Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information 1594962400 - Finishing Validator.ValidateExportModel - the NodeId=""ns=1;i=32"", BrowseName=""Default JSON"", ModellingRule="""" is not added to the exported model";;;;"2022-04-06T13:19:47.3536885Z";; +"UANodeSetValidation";Information;711552454;;"Finishing Validator.ValidateExportModel - the model contains 4 nodes and no errors/warnings reported";;;;"2022-04-06T13:19:47.3536885Z";; +"AddressSpacePrototyping";Verbose;1637887217;;"Writing model to XML file DataTypeTest.asp.xml";;;;"2022-04-06T13:19:47.3536885Z";; +"UAModelDesignExport";Information;279330276;;"The ModelDesign XML has been saved to file DataTypeTest.asp.xml and decorated with the stylesheet XMLstylesheet";;;;"2022-04-06T13:19:47.4851326Z";; +"AddressSpacePrototyping";Verbose;918215642;;"Execution time = 71s";;;;"2022-04-06T13:19:48.2571082Z";; diff --git a/SemanticData/UAModelDesignExport.UnitTest/Models/DataTypeTest/asp.warnings.log b/SemanticData/UAModelDesignExport.UnitTest/Models/DataTypeTest/asp.warnings.log new file mode 100644 index 00000000..6bee6825 --- /dev/null +++ b/SemanticData/UAModelDesignExport.UnitTest/Models/DataTypeTest/asp.warnings.log @@ -0,0 +1,7 @@ +"AddressSpacePrototyping";Information;1637887218;;"Address Space Prototyping (asp.exe) Version 6.5.3.25316";;;;"2022-04-06T13:18:36.9343563Z";; +"AddressSpacePrototyping";Information;1637887219;;"Copyright(c) 2022 Mariusz Postol";;;;"2022-04-06T13:18:36.9353565Z";; +"UANodeSetValidation";Information;190380256;;"Entering ImportUANodeSet and starting model import form file DataTypeTest.NodeSet2.xml";;;;"2022-04-06T13:19:46.7118577Z";; +"UANodeSetValidation";Information;856488909;;"Entering IAddressSpaceContext.ValidateAndExportModel - starting for the http://cas.eu/UA/CommServer/UnitTests/DataTypeTest namespace.";;;;"2022-04-06T13:19:47.3094364Z";; +"UANodeSetValidation";Information;1606585634;;"Do Validator.ValidateExportModel - now the model contains 4 nodes";;;;"2022-04-06T13:19:47.3285426Z";; +"UANodeSetValidation";Information;711552454;;"Finishing Validator.ValidateExportModel - the model contains 4 nodes and no errors/warnings reported";;;;"2022-04-06T13:19:47.3536885Z";; +"UAModelDesignExport";Information;279330276;;"The ModelDesign XML has been saved to file DataTypeTest.asp.xml and decorated with the stylesheet XMLstylesheet";;;;"2022-04-06T13:19:47.4851326Z";; diff --git a/SemanticData/UAModelDesignExport.UnitTest/Models/DoRecoverModelDesign.cmd b/SemanticData/UAModelDesignExport.UnitTest/Models/DoRecoverModelDesign.cmd index a6b81e13..64b54be7 100644 --- a/SemanticData/UAModelDesignExport.UnitTest/Models/DoRecoverModelDesign.cmd +++ b/SemanticData/UAModelDesignExport.UnitTest/Models/DoRecoverModelDesign.cmd @@ -3,24 +3,24 @@ del %1\asp.log /q del %1\asp.warnings.log /q -%1\asp "XMLModels\DataTypeTest.NodeSet2.xml" -e "XMLModels\DataTypeTest.asp.xml" -s XMLstylesheet -n "http://cas.eu/UA/CommServer/UnitTests/DataTypeTest" -xcopy %1\asp.log ReferenceTest.asp.log /y -xcopy %1\asp.warnings.log ReferenceTest.asp.warnings.log /y /i +%1\asp "DataTypeTest\DataTypeTest.NodeSet2.xml" -e "DataTypeTest.asp.xml" -s XMLstylesheet -n "http://cas.eu/UA/CommServer/UnitTests/DataTypeTest" +xcopy %1\asp.log DataTypeTest\asp.log /y +xcopy %1\asp.warnings.log DataTypeTest\asp.warnings.log /y /i del %1\asp.log /q del %1\asp.warnings.log /q -%1\asp "XMLModels\ObjectTypeTest.NodeSet2.xml" -e "XMLModels\ObjectTypeTest.asp.xml" -s XMLstylesheet -n "http://cas.eu/UA/CommServer/UnitTests/ObjectTypeTest" -xcopy %1\asp.log ReferenceTest.asp.log /y -xcopy %1\asp.warnings.log ReferenceTest.asp.warnings.log /y /i +%1\asp "ObjectTypeTest\ObjectTypeTest.NodeSet2.xml" -e "ObjectTypeTest.asp.xml" -s XMLstylesheet -n "http://cas.eu/UA/CommServer/UnitTests/ObjectTypeTest" +xcopy %1\asp.log ObjectTypeTest\asp.log /y +xcopy %1\asp.warnings.log ObjectTypeTest\asp.warnings.log /y /i del %1\asp.log /q del %1\asp.warnings.log /q -%1\asp "XMLModels\ReferenceTest.NodeSet2.xml" -e "XMLModels\ReferenceTest.asp.xml" -s XMLstylesheet -n "http://cas.eu/UA/CommServer/UnitTests/ReferenceTest" -xcopy %1\ReferenceTest.asp.log asp.log /y -xcopy %1\asp.warnings.log .\ReferenceTest.asp.warnings.log /y /i +%1\asp "ReferenceTest\ReferenceTest.NodeSet2.xml" -e "ReferenceTest.asp.xml" -s XMLstylesheet -n "http://cas.eu/UA/CommServer/UnitTests/ReferenceTest" +xcopy %1\asp.log ReferenceTest\asp.log/y +xcopy %1\asp.warnings.log ReferenceTest\asp.warnings.log /y /i del %1\asp.log /q del %1\asp.warnings.log /q -%1\asp "XMLModels\VariableTypeTest.NodeSet2.xml" -e "XMLModels\VariableTypeTest.asp.xml" -s XMLstylesheet -n "http://cas.eu/UA/CommServer/UnitTests/VariableTypeTest" -xcopy %1\asp.log VariableTypeTest.asp.log /y -xcopy %1\asp.warnings.log VariableTypeTest.asp.warnings.log /y /i +%1\asp "VariableTypeTest\VariableTypeTest.NodeSet2.xml" -e "VariableTypeTest.asp.xml" -s XMLstylesheet -n "http://cas.eu/UA/CommServer/UnitTests/VariableTypeTest" +xcopy %1\asp.log VariableTypeTest\asp.log /y +xcopy %1\asp.warnings.log VariableTypeTest\asp.warnings.log /y /i diff --git a/SemanticData/UAModelDesignExport.UnitTest/Models/ObjectTypeTest.asp.xml b/SemanticData/UAModelDesignExport.UnitTest/Models/ObjectTypeTest.asp.xml index 445a56d3..0aeb7818 100644 --- a/SemanticData/UAModelDesignExport.UnitTest/Models/ObjectTypeTest.asp.xml +++ b/SemanticData/UAModelDesignExport.UnitTest/Models/ObjectTypeTest.asp.xml @@ -1,28 +1,28 @@  - + - http://opcfoundation.org/UA/ - http://cas.eu/UA/CommServer/UnitTests/ObjectTypeTest + http://opcfoundation.org/UA/ + http://cas.eu/UA/CommServer/UnitTests/ObjectTypeTest - + - - + + ChildProperty - - + + - + - + ChildMethodNewName - + \ No newline at end of file diff --git a/SemanticData/UAModelDesignExport.UnitTest/Models/ObjectTypeTest/asp.log b/SemanticData/UAModelDesignExport.UnitTest/Models/ObjectTypeTest/asp.log new file mode 100644 index 00000000..bce7abce --- /dev/null +++ b/SemanticData/UAModelDesignExport.UnitTest/Models/ObjectTypeTest/asp.log @@ -0,0 +1,24 @@ +"AddressSpacePrototyping";Information;1637887218;;"Address Space Prototyping (asp.exe) Version 6.5.3.25316";;;;"2022-04-06T13:19:48.4036396Z";; +"AddressSpacePrototyping";Information;1637887219;;"Copyright(c) 2022 Mariusz Postol";;;;"2022-04-06T13:19:48.4036396Z";; +"AddressSpacePrototyping";Verbose;6710129;;"Creating Address Space populated using Standard Model. It will take a while ...";;;;"2022-04-06T13:19:48.5107465Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information Entering AddressSpaceContext creator - starting creation the OPC UA Address Space.";;;;"2022-04-06T13:19:48.5199307Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information Address Space - the OPC UA defined has been uploaded.";;;;"2022-04-06T13:19:48.7397934Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information Finished import UANodeSet for http://opcfoundation.org/UA/; Imported 4071 nodes.";;;;"2022-04-06T13:20:58.3515953Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information Address Space - has bee created successfully.";;;;"2022-04-06T13:20:58.3515953Z";; +"AddressSpacePrototyping";Verbose;1637887216;;"Importing UANodeSet document from file C:\VS.git\github.mpostol\OPC-UA-OOI\SemanticData\UAModelDesignExport.UnitTest\Models\ObjectTypeTest\ObjectTypeTest.NodeSet2.xml";;;;"2022-04-06T13:20:58.3515953Z";; +"UANodeSetValidation";Information;190380256;;"Entering ImportUANodeSet and starting model import form file ObjectTypeTest.NodeSet2.xml";;;;"2022-04-06T13:20:58.3515953Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information Finished import UANodeSet for http://cas.eu/UA/CommServer/UnitTests/ObjectTypeTest; Imported 13 nodes.";;;;"2022-04-06T13:20:58.7754684Z";; +"AddressSpacePrototyping";Verbose;1637887217;;"Validating and exporting a model from namespace http://cas.eu/UA/CommServer/UnitTests/ObjectTypeTest";;;;"2022-04-06T13:20:58.7754684Z";; +"UANodeSetValidation";Information;856488909;;"Entering IAddressSpaceContext.ValidateAndExportModel - starting for the http://cas.eu/UA/CommServer/UnitTests/ObjectTypeTest namespace.";;;;"2022-04-06T13:20:58.7754684Z";; +"UANodeSetValidation";Verbose;938023414;;"Selected 2 types to be validated.";;;;"2022-04-06T13:20:58.7946904Z";; +"UANodeSetValidation";Verbose;863907859;;"Selected 1 instances referenced by the ObjectsFolder to be validated.";;;;"2022-04-06T13:20:58.7946904Z";; +"UANodeSetValidation";Information;1606585634;;"Do Validator.ValidateExportModel - now the model contains 3 nodes";;;;"2022-04-06T13:20:58.8071986Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information 2054200566 - Removing instance declaration NodeId=""ns=1;i=47"", BrowseName=""EURange"", ModellingRule=""Mandatory""";;;;"2022-04-06T13:20:58.8228361Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information 2054200566 - Removing instance declaration NodeId=""ns=1;i=32"", BrowseName=""1:ChildProperty"", ModellingRule=""""";;;;"2022-04-06T13:20:58.8228361Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information 2054200566 - Removing instance declaration NodeId=""ns=1;i=55"", BrowseName=""1:ChildVariable"", ModellingRule=""""";;;;"2022-04-06T13:20:58.8228361Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information 2054200566 - Removing instance declaration NodeId=""ns=1;i=39"", BrowseName=""1:ChildMethod"", ModellingRule=""""";;;;"2022-04-06T13:20:58.8228361Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information 1594962400 - Finishing Validator.ValidateExportModel - the NodeId=""ns=1;i=59"", BrowseName=""EURange"", ModellingRule="""" is not added to the exported model";;;;"2022-04-06T13:20:58.8228361Z";; +"UANodeSetValidation";Information;711552454;;"Finishing Validator.ValidateExportModel - the model contains 3 nodes and no errors/warnings reported";;;;"2022-04-06T13:20:58.8228361Z";; +"AddressSpacePrototyping";Verbose;1637887217;;"Writing model to XML file ObjectTypeTest.asp.xml";;;;"2022-04-06T13:20:58.8228361Z";; +"UAModelDesignExport";Information;279330276;;"The ModelDesign XML has been saved to file ObjectTypeTest.asp.xml and decorated with the stylesheet XMLstylesheet";;;;"2022-04-06T13:20:58.9638674Z";; +"AddressSpacePrototyping";Verbose;918215642;;"Execution time = 71s";;;;"2022-04-06T13:20:59.6689427Z";; diff --git a/SemanticData/UAModelDesignExport.UnitTest/Models/ObjectTypeTest/asp.warnings.log b/SemanticData/UAModelDesignExport.UnitTest/Models/ObjectTypeTest/asp.warnings.log new file mode 100644 index 00000000..9badeffb --- /dev/null +++ b/SemanticData/UAModelDesignExport.UnitTest/Models/ObjectTypeTest/asp.warnings.log @@ -0,0 +1,7 @@ +"AddressSpacePrototyping";Information;1637887218;;"Address Space Prototyping (asp.exe) Version 6.5.3.25316";;;;"2022-04-06T13:19:48.4036396Z";; +"AddressSpacePrototyping";Information;1637887219;;"Copyright(c) 2022 Mariusz Postol";;;;"2022-04-06T13:19:48.4036396Z";; +"UANodeSetValidation";Information;190380256;;"Entering ImportUANodeSet and starting model import form file ObjectTypeTest.NodeSet2.xml";;;;"2022-04-06T13:20:58.3515953Z";; +"UANodeSetValidation";Information;856488909;;"Entering IAddressSpaceContext.ValidateAndExportModel - starting for the http://cas.eu/UA/CommServer/UnitTests/ObjectTypeTest namespace.";;;;"2022-04-06T13:20:58.7754684Z";; +"UANodeSetValidation";Information;1606585634;;"Do Validator.ValidateExportModel - now the model contains 3 nodes";;;;"2022-04-06T13:20:58.8071986Z";; +"UANodeSetValidation";Information;711552454;;"Finishing Validator.ValidateExportModel - the model contains 3 nodes and no errors/warnings reported";;;;"2022-04-06T13:20:58.8228361Z";; +"UAModelDesignExport";Information;279330276;;"The ModelDesign XML has been saved to file ObjectTypeTest.asp.xml and decorated with the stylesheet XMLstylesheet";;;;"2022-04-06T13:20:58.9638674Z";; diff --git a/SemanticData/UAModelDesignExport.UnitTest/Models/ReferenceTest.asp.xml b/SemanticData/UAModelDesignExport.UnitTest/Models/ReferenceTest.asp.xml index 6ee04b98..602df9d0 100644 --- a/SemanticData/UAModelDesignExport.UnitTest/Models/ReferenceTest.asp.xml +++ b/SemanticData/UAModelDesignExport.UnitTest/Models/ReferenceTest.asp.xml @@ -1,11 +1,11 @@  - + - http://opcfoundation.org/UA/ - http://cas.eu/UA/CommServer/UnitTests/ReferenceTest + http://opcfoundation.org/UA/ + http://cas.eu/UA/CommServer/UnitTests/ReferenceTest - + FromSomwhere diff --git a/SemanticData/UAModelDesignExport.UnitTest/Models/ReferenceTest/asp.log b/SemanticData/UAModelDesignExport.UnitTest/Models/ReferenceTest/asp.log new file mode 100644 index 00000000..7fad662b --- /dev/null +++ b/SemanticData/UAModelDesignExport.UnitTest/Models/ReferenceTest/asp.log @@ -0,0 +1,19 @@ +"AddressSpacePrototyping";Information;1637887218;;"Address Space Prototyping (asp.exe) Version 6.5.3.25316";;;;"2022-04-06T13:20:59.8292885Z";; +"AddressSpacePrototyping";Information;1637887219;;"Copyright(c) 2022 Mariusz Postol";;;;"2022-04-06T13:20:59.8292885Z";; +"AddressSpacePrototyping";Verbose;6710129;;"Creating Address Space populated using Standard Model. It will take a while ...";;;;"2022-04-06T13:20:59.9379320Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information Entering AddressSpaceContext creator - starting creation the OPC UA Address Space.";;;;"2022-04-06T13:20:59.9517714Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information Address Space - the OPC UA defined has been uploaded.";;;;"2022-04-06T13:21:00.2101717Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information Finished import UANodeSet for http://opcfoundation.org/UA/; Imported 4071 nodes.";;;;"2022-04-06T13:22:10.9380369Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information Address Space - has bee created successfully.";;;;"2022-04-06T13:22:10.9380369Z";; +"AddressSpacePrototyping";Verbose;1637887216;;"Importing UANodeSet document from file C:\VS.git\github.mpostol\OPC-UA-OOI\SemanticData\UAModelDesignExport.UnitTest\Models\ReferenceTest\ReferenceTest.NodeSet2.xml";;;;"2022-04-06T13:22:10.9430384Z";; +"UANodeSetValidation";Information;190380256;;"Entering ImportUANodeSet and starting model import form file ReferenceTest.NodeSet2.xml";;;;"2022-04-06T13:22:10.9430384Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information Finished import UANodeSet for http://cas.eu/UA/CommServer/UnitTests/ReferenceTest; Imported 1 nodes.";;;;"2022-04-06T13:22:10.9560339Z";; +"AddressSpacePrototyping";Verbose;1637887217;;"Validating and exporting a model from namespace http://cas.eu/UA/CommServer/UnitTests/ReferenceTest";;;;"2022-04-06T13:22:10.9560339Z";; +"UANodeSetValidation";Information;856488909;;"Entering IAddressSpaceContext.ValidateAndExportModel - starting for the http://cas.eu/UA/CommServer/UnitTests/ReferenceTest namespace.";;;;"2022-04-06T13:22:10.9560339Z";; +"UANodeSetValidation";Verbose;938023414;;"Selected 1 types to be validated.";;;;"2022-04-06T13:22:10.9750370Z";; +"UANodeSetValidation";Verbose;863907859;;"Selected 0 instances referenced by the ObjectsFolder to be validated.";;;;"2022-04-06T13:22:10.9770361Z";; +"UANodeSetValidation";Information;1606585634;;"Do Validator.ValidateExportModel - now the model contains 1 nodes";;;;"2022-04-06T13:22:10.9810352Z";; +"UANodeSetValidation";Information;711552454;;"Finishing Validator.ValidateExportModel - the model contains 1 nodes and no errors/warnings reported";;;;"2022-04-06T13:22:10.9990342Z";; +"AddressSpacePrototyping";Verbose;1637887217;;"Writing model to XML file ReferenceTest.asp.xml";;;;"2022-04-06T13:22:10.9990342Z";; +"UAModelDesignExport";Information;279330276;;"The ModelDesign XML has been saved to file ReferenceTest.asp.xml and decorated with the stylesheet XMLstylesheet";;;;"2022-04-06T13:22:11.1262138Z";; +"AddressSpacePrototyping";Verbose;918215642;;"Execution time = 71s";;;;"2022-04-06T13:22:11.1552103Z";; diff --git a/SemanticData/UAModelDesignExport.UnitTest/Models/ReferenceTest/asp.warnings.log b/SemanticData/UAModelDesignExport.UnitTest/Models/ReferenceTest/asp.warnings.log new file mode 100644 index 00000000..d31b6192 --- /dev/null +++ b/SemanticData/UAModelDesignExport.UnitTest/Models/ReferenceTest/asp.warnings.log @@ -0,0 +1,7 @@ +"AddressSpacePrototyping";Information;1637887218;;"Address Space Prototyping (asp.exe) Version 6.5.3.25316";;;;"2022-04-06T13:20:59.8292885Z";; +"AddressSpacePrototyping";Information;1637887219;;"Copyright(c) 2022 Mariusz Postol";;;;"2022-04-06T13:20:59.8292885Z";; +"UANodeSetValidation";Information;190380256;;"Entering ImportUANodeSet and starting model import form file ReferenceTest.NodeSet2.xml";;;;"2022-04-06T13:22:10.9430384Z";; +"UANodeSetValidation";Information;856488909;;"Entering IAddressSpaceContext.ValidateAndExportModel - starting for the http://cas.eu/UA/CommServer/UnitTests/ReferenceTest namespace.";;;;"2022-04-06T13:22:10.9560339Z";; +"UANodeSetValidation";Information;1606585634;;"Do Validator.ValidateExportModel - now the model contains 1 nodes";;;;"2022-04-06T13:22:10.9810352Z";; +"UANodeSetValidation";Information;711552454;;"Finishing Validator.ValidateExportModel - the model contains 1 nodes and no errors/warnings reported";;;;"2022-04-06T13:22:10.9990342Z";; +"UAModelDesignExport";Information;279330276;;"The ModelDesign XML has been saved to file ReferenceTest.asp.xml and decorated with the stylesheet XMLstylesheet";;;;"2022-04-06T13:22:11.1262138Z";; diff --git a/SemanticData/UAModelDesignExport.UnitTest/Models/VariableTypeTest.asp.xml b/SemanticData/UAModelDesignExport.UnitTest/Models/VariableTypeTest.asp.xml index 04358151..af0c8086 100644 --- a/SemanticData/UAModelDesignExport.UnitTest/Models/VariableTypeTest.asp.xml +++ b/SemanticData/UAModelDesignExport.UnitTest/Models/VariableTypeTest.asp.xml @@ -1,23 +1,23 @@  - + - http://opcfoundation.org/UA/ - http://cas.eu/UA/CommServer/UnitTests/VariableTypeTest + http://opcfoundation.org/UA/ + http://cas.eu/UA/CommServer/UnitTests/VariableTypeTest - + - + NewDisplayName - + - + - + 1 diff --git a/SemanticData/UAModelDesignExport.UnitTest/Models/VariableTypeTest/asp.log b/SemanticData/UAModelDesignExport.UnitTest/Models/VariableTypeTest/asp.log new file mode 100644 index 00000000..3183756e --- /dev/null +++ b/SemanticData/UAModelDesignExport.UnitTest/Models/VariableTypeTest/asp.log @@ -0,0 +1,19 @@ +"AddressSpacePrototyping";Information;1637887218;;"Address Space Prototyping (asp.exe) Version 6.5.3.25316";;;;"2022-04-06T13:22:29.4882531Z";; +"AddressSpacePrototyping";Information;1637887219;;"Copyright(c) 2022 Mariusz Postol";;;;"2022-04-06T13:22:29.4892560Z";; +"AddressSpacePrototyping";Verbose;6710129;;"Creating Address Space populated using Standard Model. It will take a while ...";;;;"2022-04-06T13:22:29.5791165Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information Entering AddressSpaceContext creator - starting creation the OPC UA Address Space.";;;;"2022-04-06T13:22:29.6012084Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information Address Space - the OPC UA defined has been uploaded.";;;;"2022-04-06T13:22:29.8260784Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information Finished import UANodeSet for http://opcfoundation.org/UA/; Imported 4071 nodes.";;;;"2022-04-06T13:23:44.1589680Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information Address Space - has bee created successfully.";;;;"2022-04-06T13:23:44.1589680Z";; +"AddressSpacePrototyping";Verbose;1637887216;;"Importing UANodeSet document from file C:\VS.git\github.mpostol\OPC-UA-OOI\SemanticData\UAModelDesignExport.UnitTest\Models\VariableTypeTest\VariableTypeTest.NodeSet2.xml";;;;"2022-04-06T13:23:44.1639734Z";; +"UANodeSetValidation";Information;190380256;;"Entering ImportUANodeSet and starting model import form file VariableTypeTest.NodeSet2.xml";;;;"2022-04-06T13:23:44.1649709Z";; +"UANodeSetValidation";Verbose;43988162;;"Trace: Verbose, Error Focus: Diagnostic, Identifier: P0-0003010000 Description: It is diagnostic information Finished import UANodeSet for http://cas.eu/UA/CommServer/UnitTests/VariableTypeTest; Imported 5 nodes.";;;;"2022-04-06T13:23:44.2891716Z";; +"AddressSpacePrototyping";Verbose;1637887217;;"Validating and exporting a model from namespace http://cas.eu/UA/CommServer/UnitTests/VariableTypeTest";;;;"2022-04-06T13:23:44.2891716Z";; +"UANodeSetValidation";Information;856488909;;"Entering IAddressSpaceContext.ValidateAndExportModel - starting for the http://cas.eu/UA/CommServer/UnitTests/VariableTypeTest namespace.";;;;"2022-04-06T13:23:44.2891716Z";; +"UANodeSetValidation";Verbose;938023414;;"Selected 3 types to be validated.";;;;"2022-04-06T13:23:44.3051065Z";; +"UANodeSetValidation";Verbose;863907859;;"Selected 0 instances referenced by the ObjectsFolder to be validated.";;;;"2022-04-06T13:23:44.3051065Z";; +"UANodeSetValidation";Information;1606585634;;"Do Validator.ValidateExportModel - now the model contains 3 nodes";;;;"2022-04-06T13:23:44.3051065Z";; +"UANodeSetValidation";Information;711552454;;"Finishing Validator.ValidateExportModel - the model contains 3 nodes and no errors/warnings reported";;;;"2022-04-06T13:23:44.3363675Z";; +"AddressSpacePrototyping";Verbose;1637887217;;"Writing model to XML file VariableTypeTest.asp.xml";;;;"2022-04-06T13:23:44.3363675Z";; +"UAModelDesignExport";Information;279330276;;"The ModelDesign XML has been saved to file VariableTypeTest.asp.xml and decorated with the stylesheet XMLstylesheet";;;;"2022-04-06T13:23:44.4461506Z";; +"AddressSpacePrototyping";Verbose;918215642;;"Execution time = 75s";;;;"2022-04-06T13:23:45.0936497Z";; diff --git a/SemanticData/UAModelDesignExport.UnitTest/Models/VariableTypeTest/asp.warnings.log b/SemanticData/UAModelDesignExport.UnitTest/Models/VariableTypeTest/asp.warnings.log new file mode 100644 index 00000000..1c93d973 --- /dev/null +++ b/SemanticData/UAModelDesignExport.UnitTest/Models/VariableTypeTest/asp.warnings.log @@ -0,0 +1,7 @@ +"AddressSpacePrototyping";Information;1637887218;;"Address Space Prototyping (asp.exe) Version 6.5.3.25316";;;;"2022-04-06T13:22:29.4882531Z";; +"AddressSpacePrototyping";Information;1637887219;;"Copyright(c) 2022 Mariusz Postol";;;;"2022-04-06T13:22:29.4892560Z";; +"UANodeSetValidation";Information;190380256;;"Entering ImportUANodeSet and starting model import form file VariableTypeTest.NodeSet2.xml";;;;"2022-04-06T13:23:44.1649709Z";; +"UANodeSetValidation";Information;856488909;;"Entering IAddressSpaceContext.ValidateAndExportModel - starting for the http://cas.eu/UA/CommServer/UnitTests/VariableTypeTest namespace.";;;;"2022-04-06T13:23:44.2891716Z";; +"UANodeSetValidation";Information;1606585634;;"Do Validator.ValidateExportModel - now the model contains 3 nodes";;;;"2022-04-06T13:23:44.3051065Z";; +"UANodeSetValidation";Information;711552454;;"Finishing Validator.ValidateExportModel - the model contains 3 nodes and no errors/warnings reported";;;;"2022-04-06T13:23:44.3363675Z";; +"UAModelDesignExport";Information;279330276;;"The ModelDesign XML has been saved to file VariableTypeTest.asp.xml and decorated with the stylesheet XMLstylesheet";;;;"2022-04-06T13:23:44.4461506Z";; From 83ee3e8074ae527f6a09323265ada73445008378 Mon Sep 17 00:00:00 2001 From: MPostol Date: Fri, 8 Apr 2022 21:25:36 +0200 Subject: [PATCH 2/2] Update models to harmonize with current UA-ModelCompiler release #655 - UT was fixed --- .../AddressSpaceContextUnitTest.cs | 3 +- .../Helpers/TracedAddressSpaceContext.cs | 6 +- .../XMLModelsCorrectModelsUnitTest.cs | 2 +- .../XMLModelsModelsWithErrorsUnitTest.cs | 86 +++++++++++-------- .../XMLModelsProblemsToReportUnitTest.cs | 4 +- .../TracedAddressSpaceContext.cs | 9 +- .../NodeSetUnitTest.cs | 4 +- .../AddressSpaceContext.cs | 35 ++++---- 8 files changed, 82 insertions(+), 67 deletions(-) diff --git a/SemanticData/Tests/USNodeSetValidationUnitTestProject/AddressSpaceContextUnitTest.cs b/SemanticData/Tests/USNodeSetValidationUnitTestProject/AddressSpaceContextUnitTest.cs index ad616eb3..0159e52f 100644 --- a/SemanticData/Tests/USNodeSetValidationUnitTestProject/AddressSpaceContextUnitTest.cs +++ b/SemanticData/Tests/USNodeSetValidationUnitTestProject/AddressSpaceContextUnitTest.cs @@ -146,8 +146,7 @@ public void AddressSpaceContextValidateAndExportModelOpcUa() { TracedAddressSpaceContext _asp = new TracedAddressSpaceContext(); ((IAddressSpaceContext)_asp.AddressSpaceContext).ValidateAndExportModel(new Uri(UAInformationModel.Namespaces.OpcUa)); - _asp.TestConsistency(1); - Assert.AreEqual(BuildError.WrongReference2Property.Identifier, _asp.TraceList[0].BuildError.Identifier); + _asp.TestConsistency(0); } [TestMethod] diff --git a/SemanticData/Tests/USNodeSetValidationUnitTestProject/Helpers/TracedAddressSpaceContext.cs b/SemanticData/Tests/USNodeSetValidationUnitTestProject/Helpers/TracedAddressSpaceContext.cs index da080095..050e641c 100644 --- a/SemanticData/Tests/USNodeSetValidationUnitTestProject/Helpers/TracedAddressSpaceContext.cs +++ b/SemanticData/Tests/USNodeSetValidationUnitTestProject/Helpers/TracedAddressSpaceContext.cs @@ -41,6 +41,7 @@ internal void Clear() public void TraceData(TraceEventType eventType, int id, object data) { + throw new NotImplementedException($"{nameof(TraceData)} must not be used"); string message = $"TraceData eventType = {eventType}, id = {id}, {data}"; Console.WriteLine(message); if (eventType == TraceEventType.Critical || eventType == TraceEventType.Error) @@ -50,9 +51,10 @@ public void TraceData(TraceEventType eventType, int id, object data) public void WriteTraceMessage(TraceMessage traceMessage) { Console.WriteLine(traceMessage.ToString()); + if (traceMessage.BuildError.Focus == Focus.Diagnostic) + return; Errors++; - if (traceMessage.BuildError.Focus != Focus.Diagnostic) - TraceList.Add(traceMessage); + TraceList.Add(traceMessage); } #endregion IBuildErrorsHandling diff --git a/SemanticData/Tests/USNodeSetValidationUnitTestProject/XMLModelsCorrectModelsUnitTest.cs b/SemanticData/Tests/USNodeSetValidationUnitTestProject/XMLModelsCorrectModelsUnitTest.cs index 8cfb02a5..f41a574c 100644 --- a/SemanticData/Tests/USNodeSetValidationUnitTestProject/XMLModelsCorrectModelsUnitTest.cs +++ b/SemanticData/Tests/USNodeSetValidationUnitTestProject/XMLModelsCorrectModelsUnitTest.cs @@ -78,7 +78,7 @@ public void UADataTypeTestMethod() { FileInfo _testDataFileInfo = new FileInfo(@"CorrectModels\DataTypeTest\DataTypeTest.NodeSet2.xml"); Assert.IsTrue(_testDataFileInfo.Exists); - List _nodes = ValidateAndExportModelUnitTest(_testDataFileInfo, 18, new UriBuilder("http://cas.eu/UA/CommServer/UnitTests/DataTypeTest").Uri); + List _nodes = ValidateAndExportModelUnitTest(_testDataFileInfo, 22, new UriBuilder("http://cas.eu/UA/CommServer/UnitTests/DataTypeTest").Uri); Assert.IsFalse(_nodes.Where(x => x.UANode == null).Any()); Assert.AreEqual(4, _nodes.Where(x => x.UANode is UAType).Count()); } diff --git a/SemanticData/Tests/USNodeSetValidationUnitTestProject/XMLModelsModelsWithErrorsUnitTest.cs b/SemanticData/Tests/USNodeSetValidationUnitTestProject/XMLModelsModelsWithErrorsUnitTest.cs index d94d3240..fb19d544 100644 --- a/SemanticData/Tests/USNodeSetValidationUnitTestProject/XMLModelsModelsWithErrorsUnitTest.cs +++ b/SemanticData/Tests/USNodeSetValidationUnitTestProject/XMLModelsModelsWithErrorsUnitTest.cs @@ -30,11 +30,13 @@ public void ObjectEventNotifierOutOfRangeTestMethod() IAddressSpaceContext _as = _log.AddressSpaceContext; Assert.IsNotNull(_as); _as.ImportUANodeSet(_testDataFileInfo); + Assert.AreEqual(1, _log.TraceList.Count()); Assert.AreEqual(BuildError.ModelsCannotBeNull.Identifier, _log.TraceList[0].BuildError.Identifier); _log.Clear(); _as.ValidateAndExportModel(m_NameSpace); - Assert.AreEqual(1, _log.TraceList.Count); + Assert.AreEqual(2, _log.TraceList.Count); Assert.AreEqual(BuildError.WrongEventNotifier.Identifier, _log.TraceList[0].BuildError.Identifier); + Assert.AreEqual(BuildError.NonCategorized.Identifier, _log.TraceList[1].BuildError.Identifier); } [TestMethod] @@ -50,10 +52,10 @@ public void WrongReference2PropertyTestMethod() Assert.AreEqual(1, _log.TraceList.Count()); _log.Clear(); _as.ValidateAndExportModel(m_NameSpace); - Assert.AreEqual(1, _log.TraceList.Count()); + Assert.AreEqual(2, _log.TraceList.Count()); //TODO The exported model doesn't contain all nodes #653 review WrongReference2PropertyTestMethod - //Assert.AreEqual(BuildError.WrongReference2Variable.Identifier, _log.TraceList[0].BuildError.Identifier); Assert.AreEqual(BuildError.WrongReference2Property.Identifier, _log.TraceList[0].BuildError.Identifier); + Assert.AreEqual(BuildError.NonCategorized.Identifier, _log.TraceList[1].BuildError.Identifier); } [TestMethod] @@ -67,14 +69,15 @@ public void WrongValueRankTestMethod() Assert.IsNotNull(_as); Assert.IsNotNull(_as); _as.ImportUANodeSet(_testDataFileInfo); - Assert.AreEqual(1, _log.TraceList.Where(x => x.BuildError.Focus != Focus.Diagnostic).Count()); + Assert.AreEqual(1, _log.TraceList.Count); _log.Clear(); _as.ValidateAndExportModel(m_NameSpace); - Assert.AreEqual(2, _log.TraceList.Count()); + Assert.AreEqual(3, _log.TraceList.Count()); Assert.AreEqual(BuildError.WrongValueRank.Identifier, _log.TraceList[0].BuildError.Identifier); Assert.AreEqual(BuildError.WrongValueRank.Identifier, _log.TraceList[1].BuildError.Identifier); Assert.AreEqual(_log.TraceList[0].Message, _log.TraceList[1].Message); //Duplicated log entry Assert.AreEqual("The value -4 is not supported", _log.TraceList[0].Message); + Assert.AreEqual(BuildError.NonCategorized.Identifier, _log.TraceList[2].BuildError.Identifier); } [TestMethod] @@ -85,14 +88,14 @@ public void WrongAccessLevelTestMethod() Assert.IsTrue(_testDataFileInfo.Exists); TracedAddressSpaceContext _log = new TracedAddressSpaceContext(); IAddressSpaceContext _as = _log.AddressSpaceContext; - Assert.IsNotNull(_as); - Assert.IsNotNull(_as); _as.ImportUANodeSet(_testDataFileInfo); Assert.AreEqual(1, _log.TraceList.Count()); + Assert.AreEqual(BuildError.ModelsCannotBeNull.Identifier, _log.TraceList[0].BuildError.Identifier); _log.Clear(); _as.ValidateAndExportModel(m_NameSpace); - Assert.AreEqual(1, _log.TraceList.Where(x => x.BuildError.Focus != Focus.Diagnostic).Count()); - Assert.IsTrue(_log.TraceList.Where(x => x.BuildError.Identifier == "P3-0506040000").Any()); + Assert.AreEqual(2, _log.TraceList.Count()); + Assert.AreEqual(BuildError.WrongAccessLevel.Identifier, _log.TraceList[0].BuildError.Identifier); + Assert.AreEqual(BuildError.NonCategorized.Identifier, _log.TraceList[1].BuildError.Identifier); } [TestMethod] @@ -103,14 +106,16 @@ public void WrongInverseNameTestMethod() Assert.IsTrue(_testDataFileInfo.Exists); TracedAddressSpaceContext _log = new TracedAddressSpaceContext(); IAddressSpaceContext _as = _log.AddressSpaceContext; - Assert.IsNotNull(_as); - Assert.IsNotNull(_as); _as.ImportUANodeSet(_testDataFileInfo); - Assert.AreEqual(1, _log.TraceList.Where(x => x.BuildError.Focus != Focus.Diagnostic).Count()); + Assert.AreEqual(1, _log.TraceList.Count()); + Assert.AreEqual(BuildError.ModelsCannotBeNull.Identifier, _log.TraceList[0].BuildError.Identifier); _log.Clear(); _as.ValidateAndExportModel(m_NameSpace); - Assert.AreEqual(3, _log.TraceList.Count()); - Assert.AreEqual(3, _log.TraceList.Where(x => x.BuildError.Identifier == "P3-0503020000").Count()); + Assert.AreEqual(4, _log.TraceList.Count()); + Assert.AreEqual(BuildError.WrongInverseName.Identifier, _log.TraceList[0].BuildError.Identifier); + Assert.AreEqual(BuildError.WrongInverseName.Identifier, _log.TraceList[1].BuildError.Identifier); + Assert.AreEqual(BuildError.WrongInverseName.Identifier, _log.TraceList[2].BuildError.Identifier); + Assert.AreEqual(BuildError.NonCategorized.Identifier, _log.TraceList[3].BuildError.Identifier); } [TestMethod] @@ -138,14 +143,14 @@ public void WrongDisplayNameLength() Assert.IsTrue(_testDataFileInfo.Exists); TracedAddressSpaceContext _log = new TracedAddressSpaceContext(); IAddressSpaceContext _as = _log.AddressSpaceContext; - Assert.IsNotNull(_as); - Assert.IsNotNull(_as); _as.ImportUANodeSet(_testDataFileInfo); - Assert.AreEqual(1, _log.TraceList.Where(x => x.BuildError.Focus != Focus.Diagnostic).Count()); + Assert.AreEqual(1, _log.TraceList.Count()); + Assert.AreEqual(BuildError.ModelsCannotBeNull.Identifier, _log.TraceList[0].BuildError.Identifier); _log.Clear(); _as.ValidateAndExportModel(m_NameSpace); - Assert.AreEqual(1, _log.TraceList.Count); - Assert.IsTrue(_log.TraceList.Where(x => x.BuildError.Identifier == "P3-0502050000").Any()); + Assert.AreEqual(2, _log.TraceList.Count); + Assert.AreEqual(BuildError.WrongDisplayNameLength.Identifier, _log.TraceList[0].BuildError.Identifier); + Assert.AreEqual(BuildError.NonCategorized.Identifier, _log.TraceList[1].BuildError.Identifier); } [TestMethod] @@ -156,14 +161,15 @@ public void WrongWriteMaskValue() Assert.IsTrue(_testDataFileInfo.Exists); TracedAddressSpaceContext _log = new TracedAddressSpaceContext(); IAddressSpaceContext _as = _log.AddressSpaceContext; - Assert.IsNotNull(_as); - Assert.IsNotNull(_as); _as.ImportUANodeSet(_testDataFileInfo); - Assert.AreEqual(1, _log.TraceList.Where(x => x.BuildError.Focus != Focus.Diagnostic).Count()); + Assert.AreEqual(1, _log.TraceList.Count()); + Assert.AreEqual(BuildError.ModelsCannotBeNull.Identifier, _log.TraceList[0].BuildError.Identifier); _log.Clear(); _as.ValidateAndExportModel(m_NameSpace); - Assert.AreEqual(2, _log.TraceList.Count); - Assert.AreEqual(2, _log.TraceList.Where(x => x.BuildError.Identifier == BuildError.WrongWriteMaskValue.Identifier).Count()); + Assert.AreEqual(3, _log.TraceList.Count); + Assert.AreEqual(BuildError.WrongWriteMaskValue.Identifier, _log.TraceList[0].BuildError.Identifier); + Assert.AreEqual(BuildError.WrongWriteMaskValue.Identifier, _log.TraceList[1].BuildError.Identifier); + Assert.AreEqual(BuildError.NonCategorized.Identifier, _log.TraceList[2].BuildError.Identifier); } [TestMethod] @@ -174,10 +180,8 @@ public void NotSupportedFeature() Assert.IsTrue(_testDataFileInfo.Exists); TracedAddressSpaceContext _log = new TracedAddressSpaceContext(); IAddressSpaceContext _as = _log.AddressSpaceContext; - Assert.IsNotNull(_as); - Assert.IsNotNull(_as); _as.ImportUANodeSet(_testDataFileInfo); - Assert.AreEqual(1, _log.TraceList.Where(x => x.BuildError.Focus != Focus.Diagnostic).Count()); + Assert.AreEqual(1, _log.TraceList.Count()); Assert.AreEqual(BuildError.ModelsCannotBeNull.Identifier, _log.TraceList[0].BuildError.Identifier); _log.Clear(); _as.ValidateAndExportModel(m_NameSpace); @@ -198,8 +202,9 @@ public void WrongBrowseName() Assert.AreEqual(BuildError.EmptyBrowseName.Identifier, _log.TraceList[1].BuildError.Identifier); _log.Clear(); _as.ValidateAndExportModel(m_NameSpace); - Assert.AreEqual(1, _log.TraceList.Where(x => x.BuildError.Focus != Focus.Diagnostic).Count()); + Assert.AreEqual(2, _log.TraceList.Where(x => x.BuildError.Focus != Focus.Diagnostic).Count()); Assert.AreEqual(BuildError.WrongSymbolicName.Identifier, _log.TraceList[0].BuildError.Identifier); + Assert.AreEqual(BuildError.NonCategorized.Identifier, _log.TraceList[1].BuildError.Identifier); } [TestMethod] @@ -211,11 +216,13 @@ public void WrongNodeId() TracedAddressSpaceContext _log = new TracedAddressSpaceContext(); IAddressSpaceContext _as = _log.AddressSpaceContext; _as.ImportUANodeSet(_testDataFileInfo); - Assert.AreEqual(1, _log.TraceList.Where(x => x.BuildError.Focus != Focus.Diagnostic).Count()); + Assert.AreEqual(1, _log.TraceList.Count()); + Assert.AreEqual(BuildError.ModelsCannotBeNull.Identifier, _log.TraceList[0].BuildError.Identifier); _log.Clear(); _as.ValidateAndExportModel(m_NameSpace); - Assert.AreEqual(1, _log.TraceList.Count()); + Assert.AreEqual(2, _log.TraceList.Count()); Assert.AreEqual(BuildError.NodeIdNotDefined.Identifier, _log.TraceList[0].BuildError.Identifier); + Assert.AreEqual(BuildError.NonCategorized.Identifier, _log.TraceList[1].BuildError.Identifier); } [TestMethod] @@ -227,11 +234,14 @@ public void UndefinedHasSubtypeTestMethod() TracedAddressSpaceContext _log = new TracedAddressSpaceContext(); IAddressSpaceContext _as = _log.AddressSpaceContext; _as.ImportUANodeSet(_testDataFileInfo); - Assert.AreEqual(1, _log.TraceList.Where(x => x.BuildError.Focus != Focus.Diagnostic).Count()); + //Assert.AreEqual(1, _log.TraceList.Where(x => x.BuildError.Focus != Focus.Diagnostic).Count()); + Assert.AreEqual(1, _log.TraceList.Count()); + Assert.AreEqual(BuildError.ModelsCannotBeNull.Identifier, _log.TraceList[0].BuildError.Identifier); _log.Clear(); _as.ValidateAndExportModel(m_NameSpace); - Assert.AreEqual(1, _log.TraceList.Count()); + Assert.AreEqual(2, _log.TraceList.Count()); Assert.AreEqual(BuildError.UndefinedHasSubtypeTarget.Identifier, _log.TraceList[0].BuildError.Identifier); + Assert.AreEqual(BuildError.NonCategorized.Identifier, _log.TraceList[1].BuildError.Identifier); } [TestMethod] @@ -243,12 +253,12 @@ public void UndefinedHasTypeDefinitionTestMethod() TracedAddressSpaceContext _log = new TracedAddressSpaceContext(); IAddressSpaceContext _as = _log.AddressSpaceContext; _as.ImportUANodeSet(_testDataFileInfo); - Assert.AreEqual(1, _log.TraceList.Where(x => x.BuildError.Focus != Focus.Diagnostic).Count()); + Assert.AreEqual(1, _log.TraceList.Count()); + Assert.AreEqual(BuildError.ModelsCannotBeNull.Identifier, _log.TraceList[0].BuildError.Identifier); + _log.Clear(); _as.ValidateAndExportModel(m_NameSpace); + Assert.AreEqual(0, _log.TraceList.Count()); //TODO Recognize problems with P3.7.13 HasTypeDefinition ReferenceType #39 - Assert.Inconclusive("Instances are not imported - the error is not recognized."); - Assert.AreEqual(3, _log.TraceList.Where(x => x.BuildError.Focus != Focus.Diagnostic).Count()); - Assert.AreEqual(1, _log.TraceList.Where(x => x.BuildError.Identifier == "P3-0713000000").Count()); } /// @@ -264,13 +274,15 @@ public void UndefinedHasComponentTargetTestMethod() IAddressSpaceContext _as = _log.AddressSpaceContext; _as.ImportUANodeSet(_testDataFileInfo); Assert.AreEqual(1, _log.TraceList.Count()); + Assert.AreEqual(BuildError.ModelsCannotBeNull.Identifier, _log.TraceList[0].BuildError.Identifier); _log.Clear(); _as.ValidateAndExportModel(m_NameSpace); - Assert.AreEqual(4, _log.TraceList.Where(x => x.BuildError.Focus != Focus.Diagnostic).Count()); + Assert.AreEqual(5, _log.TraceList.Where(x => x.BuildError.Focus != Focus.Diagnostic).Count()); Assert.AreEqual(BuildError.NodeCannotBeNull.Identifier, _log.TraceList[0].BuildError.Identifier); Assert.AreEqual(BuildError.NodeCannotBeNull.Identifier, _log.TraceList[1].BuildError.Identifier); Assert.AreEqual(BuildError.DanglingReferenceTarget.Identifier, _log.TraceList[2].BuildError.Identifier); Assert.AreEqual(BuildError.DanglingReferenceTarget.Identifier, _log.TraceList[3].BuildError.Identifier); + Assert.AreEqual(BuildError.NonCategorized.Identifier, _log.TraceList[4].BuildError.Identifier); } #endregion TestMethod diff --git a/SemanticData/Tests/USNodeSetValidationUnitTestProject/XMLModelsProblemsToReportUnitTest.cs b/SemanticData/Tests/USNodeSetValidationUnitTestProject/XMLModelsProblemsToReportUnitTest.cs index a1dcaf15..5652bbf1 100644 --- a/SemanticData/Tests/USNodeSetValidationUnitTestProject/XMLModelsProblemsToReportUnitTest.cs +++ b/SemanticData/Tests/USNodeSetValidationUnitTestProject/XMLModelsProblemsToReportUnitTest.cs @@ -60,7 +60,7 @@ public void NameInheritedFrom0Test() Assert.AreEqual(0, traceContext.TraceList.Count); traceContext.Clear(); addressSpace.ValidateAndExportModel(new UriBuilder("http://tricycleTypeV1").Uri); - Assert.AreEqual(1, traceContext.TraceList.Count); + Assert.AreEqual(2, traceContext.TraceList.Count); IEnumerable nodes = testingModelFixture.Export(); Assert.AreEqual(3, nodes.Count()); Dictionary nodesDictionary = nodes.ToDictionary(x => x.SymbolicName.Name); @@ -99,7 +99,7 @@ public void eoursel510Test() Assert.AreEqual(0, traceContext.TraceList.Count); traceContext.Clear(); addressSpace.ValidateAndExportModel(new UriBuilder("http://tricycleTypeV1").Uri); - Assert.AreEqual(4, traceContext.TraceList.Count); + Assert.AreEqual(5, traceContext.TraceList.Count); IEnumerable nodes = testingModelFixture.Export(); Assert.AreEqual(22, nodes.Count()); Dictionary nodesDictionary = nodes.ToDictionary(x => x.SymbolicName.Name); diff --git a/SemanticData/UAModelDesignExport.UnitTest/Instrumentation/TracedAddressSpaceContext.cs b/SemanticData/UAModelDesignExport.UnitTest/Instrumentation/TracedAddressSpaceContext.cs index e082947c..3c3fbc71 100644 --- a/SemanticData/UAModelDesignExport.UnitTest/Instrumentation/TracedAddressSpaceContext.cs +++ b/SemanticData/UAModelDesignExport.UnitTest/Instrumentation/TracedAddressSpaceContext.cs @@ -1,6 +1,6 @@ //__________________________________________________________________________________________________ // -// Copyright (C) 2021, Mariusz Postol LODZ POLAND. +// Copyright (C) 2022, Mariusz Postol LODZ POLAND. // // To be in touch join the community at GitHub: https://github.com/mpostol/OPC-UA-OOI/discussions //__________________________________________________________________________________________________ @@ -50,13 +50,14 @@ public void WriteTraceMessage(TraceMessage traceMessage) { Debug.WriteLine(traceMessage.ToString()); if (traceMessage.BuildError.Focus == Focus.Diagnostic) - Errors++; - else - TraceList.Add(traceMessage); + return; + Errors++; + TraceList.Add(traceMessage); } public void TraceData(TraceEventType eventType, int id, object data) { + throw new NotImplementedException("It is intentionally not implemented"); if ((eventType == TraceEventType.Verbose) || (eventType == TraceEventType.Information)) Errors++; else diff --git a/SemanticData/UAModelDesignExport.UnitTest/NodeSetUnitTest.cs b/SemanticData/UAModelDesignExport.UnitTest/NodeSetUnitTest.cs index c0ea785b..066c901c 100644 --- a/SemanticData/UAModelDesignExport.UnitTest/NodeSetUnitTest.cs +++ b/SemanticData/UAModelDesignExport.UnitTest/NodeSetUnitTest.cs @@ -71,7 +71,7 @@ public void UAObjectTypeTestMethod() { ModelDesign _actual = addressSpace.CreateInstance(_testDataFileInfo, uri); CompareModelDesign(_expected, _actual); - Assert.AreEqual(0, addressSpace.TraceList.Where(x => x.BuildError.Focus != Focus.Diagnostic).Count()); + Assert.AreEqual(0, addressSpace.TraceList.Count); Assert.AreEqual(3, _expected.Items.Length); CompareModelDesign(_expected, _actual); } @@ -105,7 +105,7 @@ public void UADataTypeTestMethod() { ModelDesign _actual = addressSpace.CreateInstance(_testDataFileInfo, uri); CompareModelDesign(_expected, _actual); - Assert.AreEqual(0, addressSpace.TraceList.Where(x => x.BuildError.Focus != Focus.Diagnostic).Count()); + Assert.AreEqual(0, addressSpace.TraceList.Count); Assert.AreEqual(4, _expected.Items.Length); Assert.AreEqual(4, _actual.Items.Length); CompareModelDesign(_expected, _actual); diff --git a/SemanticData/UANodeSetValidation/AddressSpaceContext.cs b/SemanticData/UANodeSetValidation/AddressSpaceContext.cs index ef5dff13..9a3ae843 100644 --- a/SemanticData/UANodeSetValidation/AddressSpaceContext.cs +++ b/SemanticData/UANodeSetValidation/AddressSpaceContext.cs @@ -77,7 +77,7 @@ public IModelFactory InformationModelFactory //TODO IAddressSpaceContext.ImportUANodeSet(System.IO.FileInfo) returned result must be tested. #626 Uri IAddressSpaceContext.ImportUANodeSet(UANodeSet model) { - m_TraceEvent.TraceData(TraceEventType.Verbose, 359517792, "Entering AddressSpaceContextService.ImportUANodeSet - importing from object model."); + m_TraceEvent.WriteTraceMessage(TraceMessage.DiagnosticTraceMessage($"{359517792}, Entering {nameof(IAddressSpaceContext.ImportUANodeSet)} - importing from object model.")); if (model == null) throw new ArgumentNullException("model", "the model cannot be null"); return ImportNodeSet(model); @@ -98,7 +98,7 @@ Uri IAddressSpaceContext.ImportUANodeSet(FileInfo document) { if (document == null) throw new ArgumentNullException("model", "the model cannot be null"); - m_TraceEvent.TraceData(TraceEventType.Information, 190380256, $"Entering {nameof(IAddressSpaceContext.ImportUANodeSet)} and starting model import form file {document.Name}"); + m_TraceEvent.WriteTraceMessage(TraceMessage.DiagnosticTraceMessage($"190380256, Entering {nameof(IAddressSpaceContext.ImportUANodeSet)} and starting model import form file {document.Name}")); if (!document.Exists) throw new FileNotFoundException("The imported file does not exist", document.FullName); UANodeSet _nodeSet = UANodeSet.ReadModelFile(document); @@ -112,7 +112,7 @@ Uri IAddressSpaceContext.ImportUANodeSet(FileInfo document) /// targetNamespace;Cannot find this namespace void IAddressSpaceContext.ValidateAndExportModel(Uri targetNamespace) { - m_TraceEvent.TraceData(TraceEventType.Information, 856488909, $"Entering IAddressSpaceContext.ValidateAndExportModel - starting for the {targetNamespace} namespace."); + m_TraceEvent.WriteTraceMessage(TraceMessage.DiagnosticTraceMessage($"{856488909}, Entering IAddressSpaceContext.ValidateAndExportModel - starting for the {targetNamespace} namespace.")); List undefinedUriLists = new List(); if (!m_NamespaceTable.ValidateNamesapceTable(x => undefinedUriLists.Add(x))) foreach (Uri item in undefinedUriLists) @@ -322,7 +322,7 @@ where Object.ReferenceEquals(node.UANode, null) m_TraceEvent.WriteTraceMessage(TraceMessage.BuildErrorTraceMessage(BuildError.NodeCannotBeNull, $"the node {item.ToString()} is not defined in the UANodeSet model")); List allNodesInConcern = (from _node in stubs where _node.UANode != null select _node).ToList(); List nodes = (from _node in stubs where _node.UANode != null && (_node.UANode is UAType) select _node).ToList(); - m_TraceEvent.TraceData(TraceEventType.Verbose, 938023414, $"Selected {nodes.Count} types to be validated."); + m_TraceEvent.WriteTraceMessage(TraceMessage.DiagnosticTraceMessage($"938023414, Selected {nodes.Count} types to be validated.")); IUANodeBase _objects = TryGetUANodeContext(UAInformationModel.ObjectIds.ObjectsFolder); if (_objects is null) throw new ArgumentNullException("Cannot find ObjectsFolder in the standard information model"); @@ -330,7 +330,7 @@ where Object.ReferenceEquals(node.UANode, null) (x.TypeNode.NodeIdContext == ReferenceTypeIds.Organizes) && (x.TargetNode.NodeIdContext.NamespaceIndex == nameSpaceIndex)) .Select(x => x.TargetNode); - m_TraceEvent.TraceData(TraceEventType.Verbose, 863907859, $"Selected {_allInstances.Count()} instances referenced by the ObjectsFolder to be validated."); + m_TraceEvent.WriteTraceMessage(TraceMessage.DiagnosticTraceMessage($"863907859, Selected {_allInstances.Count()} instances referenced by the ObjectsFolder to be validated.")); nodes.AddRange(_allInstances); foreach (IModelTableEntry modelTableEntry in m_NamespaceTable.Models) { @@ -341,8 +341,8 @@ where Object.ReferenceEquals(node.UANode, null) int nodesCount = nodes.Count; do { - string doMessage = $"Do Validator.ValidateExportModel - now the model contains {nodesCount} nodes"; - m_TraceEvent.TraceData(TraceEventType.Information, 1606585634, doMessage); + string doMessage = $"1606585634, Do Validator.ValidateExportModel - now the model contains {nodesCount} nodes"; + m_TraceEvent.WriteTraceMessage(TraceMessage.DiagnosticTraceMessage(doMessage)); NodesCollection embededNodes = new NodesCollection(); foreach (IUANodeBase item in nodes) { @@ -357,25 +357,26 @@ where Object.ReferenceEquals(node.UANode, null) } } //TODO The exported model doesn't contain all nodes #653 + List notReferencedNodes = embededNodes.Values.ToList(); //.ToList(); nodes.Clear();// = embededNodes.ToList(); nodesCount += nodes.Count; } while (nodes.Count > 0); string message = null; - foreach (IUANodeBase node in allNodesInConcern) - { - message = $"{1594962400} - Finishing Validator.ValidateExportModel - the {node} is not added to the exported model"; - TraceMessage traceMessage = TraceMessage.DiagnosticTraceMessage(message); - m_TraceEvent.WriteTraceMessage(traceMessage); - } + //TODO The exported model doesn't contain all nodes #653 - uncomment and check all UT + //foreach (IUANodeBase node in allNodesInConcern) + //{ + // message = $"{1594962400} the {node} is not added to the exported model"; + // m_TraceEvent.WriteTraceMessage(TraceMessage.BuildErrorTraceMessage(BuildError.NonCategorized, message)); + //} if (m_TraceEvent.Errors == 0) { - message = $"Finishing Validator.ValidateExportModel - the model contains {nodesCount} nodes and no errors/warnings reported"; - m_TraceEvent.TraceData(TraceEventType.Information, 711552454, message); + message = $"711552454, Finishing Validator.ValidateExportModel - the model contains {nodesCount} nodes and no errors/warnings reported"; + m_TraceEvent.WriteTraceMessage(TraceMessage.DiagnosticTraceMessage(message)); } else { - message = $"Finishing Validator.ValidateExportModel - the model contains {nodesCount} nodes and {m_TraceEvent.Errors} errors reported."; - m_TraceEvent.TraceData(TraceEventType.Warning, 226242104, message); + message = $"226242104, Finishing Validator.ValidateExportModel - the model contains {nodesCount} nodes and {m_TraceEvent.Errors} errors reported."; + m_TraceEvent.WriteTraceMessage(TraceMessage.BuildErrorTraceMessage(BuildError.NonCategorized, message)); } }