//TC1.1 public void Passing_Integer_Array_Should_Return_Maximum_Value() { int[] intArray = { 10, 20, 30 }; FindMax <int> first = new FindMax <int>(intArray); int actual = first.FindMaxValue(); Assert.AreEqual(30, actual); }
public void Passing_String_Array_Should_Return_Maximum_Value() { string[] strArray = { "10", "20", "30" }; FindMax <string> third = new FindMax <string>(strArray); string actual = third.FindMaxValue(); Assert.AreEqual(30, actual); }
public void Passing_Float_Array_Should_Return_Maximum_Value() { float[] floatArray = { 10.3f, 20.4f, 30.5f }; FindMax <float> secod = new FindMax <float>(floatArray); float actual = secod.FindMaxValue(); Assert.AreEqual(30.5f, actual); }
public void Passing_String_Array_Should_Return_Maximum_Value() { string[] strArray = { "apple", "banana", "peach" }; FindMax <string> third = new FindMax <string>(strArray); string actual = third.FindMaxValue(); Assert.AreEqual(3, actual); }
public void CanFindMaxTest() { FindMax tree = new FindMax(); tree.Root = new Node(2); tree.Root.Left = new Node(7); tree.Root.Right = new Node(5); tree.Root.Left.Right = new Node(6); tree.Root.Left.Right.Left = new Node(1); tree.Root.Left.Right.Right = new Node(11); tree.Root.Right.Right = new Node(9); tree.Root.Right.Right.Left = new Node(4); Assert.Equal(11, tree.FindMaxValue(tree.Root)); }