public void Can_Get_String_From_1() { var tree = new BinaryTree(); tree.Add(7); var expected = "7"; var actual = tree.ToString(); Assert.AreEqual(expected, actual); }
public void Can_Get_String_From_Many() { int[] array = { 9, 5, 1, 14, 6 }; var tree = new BinaryTree(); tree.Init(array); var expected = "1 5 6 9 14"; var actual = tree.ToString(); Assert.AreEqual(expected, actual); }
public void Can_Get_String_From_0() { var tree = new BinaryTree(); Assert.Throws<ArgumentNullException>(() => tree.ToString()); }