public void GeneticStringTest() { GenericCheck <String> obj = new GenericCheck <String>(); String actual = (obj.Max("26", "33", "82")); Assert.Equal("82", actual); }
public void GeneticFloatTest() { GenericCheck <double> obj = new GenericCheck <double>(); double actual = (obj.Max(2.6, 3.3, 8.2)); Assert.Equal(8.2, actual); }
public void GeneticIntTest() { GenericCheck <int> obj = new GenericCheck <int>(); int actual = (obj.Max(22, 33, 90)); Assert.Equal(90, actual); }
public void GeneticMaximumStringTest() { GenericCheck <String> obj3 = new GenericCheck <String>(); String[] arr3 = { "88", "8", "56", "75" }; String actual3 = (obj3.Max(arr3)); Assert.Equal("88", actual3); }
public void GeneticMaximumDoubleTest() { GenericCheck <double> obj2 = new GenericCheck <double>(); double[] arr2 = { 8.8, 1.2, 5.6, 7.5 }; double actual2 = (obj2.Max(arr2)); Assert.Equal(8.8, actual2); }
public void GeneticMaximumIntTest() { GenericCheck <int> obj1 = new GenericCheck <int>(); int[] arr1 = { 88, 8, 56, 75 }; int actual1 = (obj1.Max(arr1)); Assert.Equal(88, actual1); }
public void givenmorethanthreeNumbers_whenallDatatype_returntestmaximum() { GenericCheck <int> obj1 = new GenericCheck <int>(); GenericCheck <double> obj2 = new GenericCheck <double>(); GenericCheck <int> obj3 = new GenericCheck <int>(); int[] Number1 = { 23, 43, 45, 55, 98, 60 }; double[] Number2 = { 0.5, 11.2, 20.9, 30.4, 70.8, 1.8 }; int[] Number3 = { "The".Length, "Maximum".Length, "Number".Length, "Problem".Length, "using".Length, "Generics".Length }; int result1 = (obj1.Max(Number1)); double result2 = (obj2.Max(Number2)); int result3 = (obj3.Max(Number3)); Assert.AreEqual(98, result1); Assert.AreEqual(70.8, result2); Assert.AreEqual(8, result3); }