public TestDocument() { TestList = new DocList <IDocLeaf>(); TestList.Add(new DocObj <int>(0)); TestList.Add(new DocObj <int>(1)); TestList.Add(new DocObj <int>(2)); TestBool = new DocObj <bool>(true); SubDoc = new TestSubDoc(); TestRef = new DocObj <int>(); }
static void TestSubDocSerialization() { TestSubDoc doc0 = DocNode.Create <TestSubDoc>(); doc0.TestInt0.Value = 777; doc0.TestInt1.Value = 888; TestSubDoc doc1 = (TestSubDoc)SerializeDeserializeNode(doc0); UnitTest.Test(doc0.TestInt0.Value == doc1.TestInt0.Value); UnitTest.Test(doc0.TestInt1.Value == doc1.TestInt1.Value); PathUtils.CheckParentChildrenLink(doc1, null); }