public void SizeTest(int[] mas, int res) { BinaryTreeLink b = new BinaryTreeLink(); b.Init(mas); int size = b.Size(); Assert.AreEqual(res, size); }
public void ClearTest(int[] mas) { BinaryTreeLink b = new BinaryTreeLink(); b.Init(mas); b.Clear(); int size = b.Size(); Assert.AreEqual(0, size); }
public void DelTest1(int[] mas, int res, int[] expMas) { BinaryTreeLink b = new BinaryTreeLink(); b.Init(mas); b.Del(12); int size = b.Size(); Assert.AreEqual(res, size); int[] masRes = b.ToArray(); CollectionAssert.AreEqual(expMas, masRes); }
public void CountWidthTest(int[] mas, int res) { BinaryTreeLink b = new BinaryTreeLink(); b.Init(mas); int nodes = b.Width(); Assert.AreEqual(res, nodes); }
public void ToStringTest(int[] mas, int[] expMas) { BinaryTreeLink b = new BinaryTreeLink(); b.Init(mas); string masRes = b.TreeToString(); CollectionAssert.AreEqual(expMas.ToString(), masRes); }