public void GivenMaxIntegerArray_WhenAtLastPosition_ThenReturnSameNumberUsingGenricClassAndMethods() { double[] array = { 60.0, 70.0, 80.0, 90.0 }; GenricMaximum <double> findMaxGenricClass = new GenricMaximum <double>(60.0, 70.0, 80.0, array); double maxNumber = findMaxGenricClass.printMaxValue(); Assert.AreEqual(90.0, maxNumber); }
public void GivenMaxStringArray_WhenAtLastPoistion_ThenReturnSameStringUsingGenricClassAndMethod() { string[] array = { "Apple", "Banana", "Cat", "Peach" }; GenricMaximum <string> findMaxGenricClass = new GenricMaximum <string>("Apple", "Banana", "Peach", array); string maxString = findMaxGenricClass.printMaxValue(); Assert.AreEqual("Peach", maxString); }
public void GivenMaxIntegerArray_WhenAtLastPosition_ThenReturnSameNumberUsingGenricClassAndMethod() { int[] array = { 600, 700, 800, 900 }; GenricMaximum <int> findMaxGenricClass = new GenricMaximum <int>(600, 700, 800, array); int maxNumber = findMaxGenricClass.printMaxValue(); Assert.AreEqual(900, maxNumber); }