Exemplo n.º 1
0
        public void EqualsUAVariableTest()
        {
            UAVariable _derivedNode = new UAVariable()
            {
                NodeId       = "ns=1;i=47",
                BrowseName   = "EURange",
                ParentNodeId = "ns=1;i=43",
                DataType     = "i=884",
                DisplayName  = new XML.LocalizedText[] { new XML.LocalizedText()
                                                         {
                                                             Value = "EURange"
                                                         } }
            };
            UANode _baseNode = new UAVariable()
            {
                NodeId       = "i=17568",
                BrowseName   = "EURange",
                ParentNodeId = "i=15318",
                DataType     = "i=884",
                DisplayName  = new XML.LocalizedText[] { new XML.LocalizedText()
                                                         {
                                                             Value = "EURange"
                                                         } }
            };

            Assert.IsTrue(_derivedNode.Equals(_baseNode));
        }
Exemplo n.º 2
0
        public void NodeClassEnumTest()
        {
            UANode _toTest = new UADataType();

            Assert.AreEqual <NodeClassEnum>(NodeClassEnum.UADataType, _toTest.NodeClassEnum);
            _toTest = new UAObject();
            Assert.AreEqual <NodeClassEnum>(NodeClassEnum.UAObject, _toTest.NodeClassEnum);
            _toTest = new UAObjectType();
            Assert.AreEqual <NodeClassEnum>(NodeClassEnum.UAObjectType, _toTest.NodeClassEnum);
            _toTest = new UAReferenceType();
            Assert.AreEqual <NodeClassEnum>(NodeClassEnum.UAReferenceType, _toTest.NodeClassEnum);
            _toTest = new UAVariable();
            Assert.AreEqual <NodeClassEnum>(NodeClassEnum.UAVariable, _toTest.NodeClassEnum);
            _toTest = new UAVariableType();
            Assert.AreEqual <NodeClassEnum>(NodeClassEnum.UAVariableType, _toTest.NodeClassEnum);
            _toTest = new UAView();
            Assert.AreEqual <NodeClassEnum>(NodeClassEnum.UAView, _toTest.NodeClassEnum);
            _toTest = new UAMethod();
            Assert.AreEqual <NodeClassEnum>(NodeClassEnum.UAMethod, _toTest.NodeClassEnum);
        }