Esempio n. 1
0
        public void test_isNodeSerializable()
        {
            var testenv = new TestEnvorioment(new InputSamples().sampleA, new DCEPSettings());

            foreach (var item in testenv.nodedict)
            {
                item.Value.onFirstStart(testenv);
            }

            Thread.Sleep(500);

            foreach (var item in testenv.nodedict)
            {
                string serialized = dataContractSerializeObject(item.Value);
            }

            testenv.terminateAll();
        }
Esempio n. 2
0
        public void test_isNodeDeserializable()
        {
            var testenv = new TestEnvorioment(new InputSamples().sampleA, new DCEPSettings());

            foreach (var item in testenv.nodedict)
            {
                item.Value.onFirstStart(testenv);
            }

            Thread.Sleep(500);

            foreach (var item in testenv.nodedict)
            {
                string serialized = dataContractSerializeObject(item.Value);
                Console.WriteLine(serialized);
                var node2 = dataContractDeserializeObject <DCEPNode>(serialized);
                Assert.NotNull(node2);
            }

            testenv.terminateAll();
        }