src/GenFx.Components.Tests/TreeNodeTest.cs
/// <summary>
/// Tests that the object can be serialized and deserialized.
/// </summary>
Tests that the object can be serialized and deserialized.
Tests that the object can be serialized and deserialized .
[Fact]
        public void TreeNode_Serialization()
        {
            TreeNode node = new TreeNode
            {
                Value = 3,
                ParentNode = new TreeNode(),
                Tree = new TestTreeEntity()
            };
            node.ChildNodes.Add(new TreeNode());
            TreeNode result = (TreeNode)SerializationHelper.TestSerialization(node, new Type[] {
                typeof(TestTreeEntity)
            });
            Assert.Equal(node.Value, result.Value);
            Assert.IsType<TreeNode>(node.ParentNode);
            Assert.IsType<TestTreeEntity>(node.Tree);
            Assert.IsType<TreeNode>(node.ChildNodes[0]);
        }
[ Fact ] public void TreeNode_Serialization ( ) { TreeNode node = new TreeNode { Value = 3 , ParentNode = new TreeNode ( ) , Tree = new TestTreeEntity ( ) } ; node . ChildNodes . Add ( new TreeNode ( ) ) ; TreeNode result = ( TreeNode ) SerializationHelper . TestSerialization ( node , new Type [ ] { typeof ( TestTreeEntity ) } ) ; Assert . Equal ( node . Value , result . Value ) ; Assert . IsType < TreeNode > ( node . ParentNode ) ; Assert . IsType < TestTreeEntity > ( node . Tree ) ; Assert . IsType < TreeNode > ( node . ChildNodes [ 0 ] ) ; }
Tests that the object can be serialized and deserialized.
Tests that the object can be serialized and deserialized .