Ejemplo n.º 1
0
        public void RemoveVertex()
        {
            mtg tree = new mtg();
            int root = tree.root;

            // Scale 1

            int root1   = tree.AddComponent(root);
            int vertex1 = tree.AddChild(root1);
            int vertex2 = tree.AddChild(root1);
            int vertex3 = tree.AddChild(root1);
            int vertex4 = tree.AddChild(vertex1);
            int vertex5 = tree.AddChild(vertex1);

            int numberVertices = tree.NbVertices();

            tree.RemoveVertex(vertex5);
            tree.RemoveVertex(vertex1, true);

            Assert.AreEqual(numberVertices - 2, tree.NbVertices());
        }