コード例 #1
0
        public void RemoveInheritedRemoveSameValuesTest()
        {
            UAObjectType _derived = GetDerivedFromComplexObjectType();
            UAObjectType _base    = GetDerivedFromComplexObjectType();

            _derived.RemoveInheritedValues(_base);
            Assert.IsNull(_derived.DisplayName);
        }
コード例 #2
0
        public void RemoveInheritedKeepDifferentValuesTest()
        {
            UAObjectType _derived = GetDerivedFromComplexObjectType();
            UAObjectType _base    = GetComplexObjectType();

            _derived.RemoveInheritedValues(_base);
            Assert.AreEqual <int>(1, _derived.DisplayName.Length);
            Assert.AreEqual <string>("DerivedFromComplexObjectType", _derived.DisplayName[0].Value);
        }
コード例 #3
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);
        }