Пример #1
0
        public void TestGetNodeByInstance()
        {
            var configA = GetSTConfigNode();
            var configB = DDNodeST.GetInstance("Config");

            CompareSingleTone(configA, configB);
        }
Пример #2
0
        public void TestGeneralParent()
        {
            var configA = GetSTConfigNode();
            var configB = DDNodeST.GetInstance("Config");
            var configC = GetSTDataNode();

            CompareSingleTone(configA.Parent, configB.Parent);
            CompareSingleTone(configA.Parent, configC.Parent);
        }
Пример #3
0
        public void TestGetNodeByInstanceAfterModify()
        {
            var configA = GetSTConfigNode();
            var configB = DDNodeST.GetInstance("Config");

            CompareSingleTone(configA, configB);
            configA.Attributes.Add(new DDValue(true));
            CompareSingleTone(configA, configB);
        }
Пример #4
0
 private void GetInstance(object sleep)
 {
     Thread.Sleep((int)sleep);
     for (int i = 0; i < 1000; i++)
     {
         DDNodeST.GetInstance();
         DDNodeST.GetInstance(i.ToString());
         DDNodeST.GetInstance(TEST_ST.TEST_ST_NAME_DATA);
     }
 }
Пример #5
0
        private DDNode GetSTDataNode()
        {
            var node = DDNodeST.GetInstance(TEST_ST.TEST_ST_NAME_DATA);

            if (node.Attributes.Contains("Data1") == false)
            {
                node.Attributes.Add("Data1", "Data1_Valu1");
            }
            if (node.Attributes.Contains("Data2") == false)
            {
                node.Attributes.Add("Data2", "Data2_Valu1");
            }
            return(node);
        }
Пример #6
0
        private DDNode GetSTConfigNode()
        {
            var node = DDNodeST.GetInstance("Config");

            if (node.Attributes.Contains("Param1") == false)
            {
                node.Attributes.Add("Param1", "Param1_Valu1");
            }
            if (node.Attributes.Contains("Param2") == false)
            {
                node.Attributes.Add("Param2", "Param2_Valu1");
            }
            return(node);
        }
Пример #7
0
 private DDNode GetSTRootNode()
 {
     return(DDNodeST.GetInstance());
 }