Exemple #1
0
 public void SizeTest(int[] mas, int res)
 {
     BinarySearchTree b = new BinarySearchTree();
     b.Init(mas);
     int size = b.Size();
     Assert.AreEqual(res, size);
 }
Exemple #2
0
 public void ClearTest(int[] mas)
 {
     BinarySearchTree b = new BinarySearchTree();
     b.Init(mas);
     b.Clear();
     int size = b.Size();
     Assert.AreEqual(0, size);
 }
Exemple #3
0
 public void DelTest(int[] mas, int res, int[] expMas)
 {
     BinarySearchTree b = new BinarySearchTree();
     b.Init(mas);
     b.Del(11);
     int size = b.Size();
     Assert.AreEqual(res, size);
     int[] masRes = b.ToArray();
     CollectionAssert.AreEqual(expMas, masRes);
 }