示例#1
0
        public void PropertyNames_NoProperties_EmptyList()
        {
            PropertyTree tree = new PropertyTree();

            List <string> expectedList = new List <string>()
            {
            };

            CollectionAssert.AreEqual(tree.PropertyNames(), expectedList);
        }
示例#2
0
        public void PropertyNames_NormalCase_ListOfNames()
        {
            PropertyTree test = new PropertyTree();

            test.properties.Add("label", new Dictionary <int, dynamic>());
            test.properties.Add("length", new Dictionary <int, dynamic>());
            test.properties["label"][1]   = "hello";
            test.properties["length"][12] = 12.5;

            List <string> listOfProperties = new List <string>()
            {
                "label", "length"
            };

            CollectionAssert.AreEqual(test.PropertyNames(), listOfProperties);
        }