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