示例#1
0
        public void TestGetSetDataOnDifferentThreads()
        {
            string id         = "TestID-{82AC4E65-CC86-4BF0-95EA-AE4B2B5E4A35}";
            string testString = "This is a test";

            SerializableSring ssString = new SerializableSring(testString);

            DSNodeServices.TraceUtils.SetTraceData(id, ssString);

            ssString = null;

            bool test = false;

            Thread th = new Thread(
                () =>
            {
                SerializableSring ret = (SerializableSring)DSNodeServices.TraceUtils.GetTraceData(id);

                test = ret == null;
            }
                );

            th.Start();
            th.Join();

            Assert.IsTrue(test);
        }
示例#2
0
        public void TestGetSetDataOnDifferentThreads()
        {
            string id = "TestID-{82AC4E65-CC86-4BF0-95EA-AE4B2B5E4A35}";
            string testString = "This is a test";

            SerializableSring ssString = new SerializableSring(testString);

            DSNodeServices.TraceUtils.SetTraceData(id, ssString);

            ssString = null;

            bool test = false;

            Thread th = new Thread(
                () =>
                {
                    SerializableSring ret = (SerializableSring)DSNodeServices.TraceUtils.GetTraceData(id);

                    test = ret == null;
                        
                }
                );
            th.Start();
            th.Join();

            Assert.IsTrue(test);


            
        }
示例#3
0
        public void TestGetSetData()
        {
            string id         = "TestID-{82AC4E65-CC86-4BF0-95EA-AE4B2B5E4A35}";
            string testString = "This is a test";

            SerializableSring ssString = new SerializableSring(testString);

            DSNodeServices.TraceUtils.SetTraceData(id, ssString);

            ssString = null;

            SerializableSring ret = (SerializableSring)DSNodeServices.TraceUtils.GetTraceData(id);

            Assert.IsTrue(ret.Payload.Equals(testString));
        }
示例#4
0
        public void TestGetSetData()
        {
            string id = "TestID-{82AC4E65-CC86-4BF0-95EA-AE4B2B5E4A35}";
            string testString = "This is a test";

            SerializableSring ssString = new SerializableSring(testString);

            DSNodeServices.TraceUtils.SetTraceData(id, ssString);

            ssString = null;

            SerializableSring ret = (SerializableSring)DSNodeServices.TraceUtils.GetTraceData(id);

            Assert.IsTrue(ret.Payload.Equals(testString));

        }