Beispiel #1
0
        public void Mtg_NewMtg_AttributesInitializedPropertiesAdded()
        {
            mtg tree = new mtg();

            Assert.AreEqual(tree.scale[0], 0);

            List <string> realList     = tree.PropertyNames();
            List <string> expectedList = new List <string>()
            {
                "Edge_Type", "label"
            };

            CollectionAssert.AreEqual(realList, expectedList);
        }
Beispiel #2
0
        public void Properties()
        {
            Algorithm a = new Algorithm();

            mtg tree = new mtg();
            int root = tree.root;

            int root1 = tree.AddComponent(root);
            int vid   = a.RandomTree(tree, root1, 18);

            List <int> childAndComplex = tree.AddChildAndComplex(vid);

            vid = a.RandomTree(tree, childAndComplex[0], 18);

            List <int> childAndComplex2 = tree.AddChildAndComplex(vid);

            vid = a.RandomTree(tree, childAndComplex2[0], 18);

            Assert.IsTrue(tree.PropertyNames().Contains("Edge_Type"));
            Assert.AreEqual(18 * 3, tree.Property("Edge_Type").Count);
        }