Ejemplo n.º 1
0
        public void DoubleLayerTreeSerializationTest()
        {
            FileCategory rootNode   = new FileCategory("a");
            FileCategory leftChild  = new FileCategory("b");
            FileCategory rightChild = new FileCategory("c");

            rootNode.AddSubCategories(new FileCategory[] { leftChild, rightChild });
            leftChild.AddSubCategory(new FileCategory("d"));
            rightChild.AddSubCategory(new FileCategory("e"));
            string actualJson = JsonConvert.SerializeObject(rootNode);

            Assert.Equal(doubleLayerTreeJson, actualJson);
        }