Ejemplo n.º 1
0
 public void TestMethodInitTree(int[] array, int[] treeArray)
 {
     Tree tree = new Tree();
     tree.Init(array);
     var arr = tree.ToArray();
     CollectionAssert.AreEqual(treeArray, arr);
 }
Ejemplo n.º 2
0
 public void TestMethodClearTree(int[] array, int[] treeArray)
 {
     Tree tree = new Tree();
     tree.Init(array);
     tree.Clear();
     CollectionAssert.AreEqual(treeArray, tree.ToArray());
 }
Ejemplo n.º 3
0
 public void TestMethodNodesTree(int[] array, int count)
 {
     Tree tree = new Tree();
     tree.Init(array);
     Assert.AreEqual(count, tree.Nodes());
 }
Ejemplo n.º 4
0
 public void TestMethodHeightTree(int[] array, int count)
 {
     Tree tree = new Tree();
     tree.Init(array);
     Assert.AreEqual(count, tree.Height());
 }
Ejemplo n.º 5
0
 public void TestMethodTreeToString(int[] array, string res)
 {
     Tree tree = new Tree();
     tree.Init(array);
     Assert.AreEqual(res, tree.TreeToString());
 }
Ejemplo n.º 6
0
 public void TestMethodSizeTree(int[] array, int size)
 {
     Tree tree = new Tree();
     tree.Init(array);
     Assert.AreEqual(size, tree.Size());
 }
Ejemplo n.º 7
0
 public void TestMethodReverseTree(int[] array, int[] res)
 {
     Tree tree = new Tree();
     tree.Init(array);
     tree.ReverseTree();
     CollectionAssert.AreEqual(res, tree.ToArray());
 }