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