public void GivenMaximumStringValueAtFirstPosition_ItShouldReturnExpectedValue() { /// Arrange string[] stringArray = { "Peach", "Apple", "Bannana", "Grapes" }; string expected = "Peach"; /// Act MaximumNumberCheck.GenericMaximum <string> findString = new MaximumNumberCheck.GenericMaximum <string>(stringArray); string stringOutput = findString.MaxValue(); /// Assert Assert.AreEqual(expected, stringOutput); }
public void GivenMaximumFloatValueAtFirstPosition_ItShouldReturnExpectedValue() { /// Arrange float[] floatArray = { 33.3f, 22.2f, 11.1f, 10.0f }; float expected = 33.3f; /// Act MaximumNumberCheck.GenericMaximum <float> findFloat = new MaximumNumberCheck.GenericMaximum <float>(floatArray); float floatOutput = findFloat.MaxValue(); /// Assert Assert.AreEqual(expected, floatOutput); }
public void GivenMaximumIntegerValueAtFirstPosition_ItShouldReturnExpectedValue() { /// Arrange int[] intArray = { 33, 22, 11, 10 }; int expected = 33; /// Act MaximumNumberCheck.GenericMaximum <int> findInteger = new MaximumNumberCheck.GenericMaximum <int>(intArray); int intgerOutput = findInteger.MaxValue(); /// Assert Assert.AreEqual(expected, intgerOutput); }
public void Given_StirngArray_ToFindMaximumStringUsingGenericClassExtentedMaxMethod_Given_MaximumStringValueAtFirstPosition_Should_ReturnExpectedValue() { //Arrange string[] stringArray = { "Mercedes", "Happy", "Egg", "Lot", "Audi" }; string expected = "Mercedes"; //Act MaximumNumberCheck.GenericMaximum <string> find = new MaximumNumberCheck.GenericMaximum <string>(stringArray); string stringOutput = find.MaxValue(); //Assert Assert.AreEqual(expected, stringOutput); }
public void Given_Float_ToFindMaximumFloatUsingGenericClassExtentedMaxMethod_Given_MaximumFloatValueAtFirstPosition_Should_ReturnExpectedValue() { //Arrange float[] floatArray = { 190.1f, 2.3f, 3.6f, 42.3f, 156.36f }; float expected = 190.1f; //Act MaximumNumberCheck.GenericMaximum <float> find = new MaximumNumberCheck.GenericMaximum <float>(floatArray); float actual = find.MaxValue(); //Assert Assert.AreEqual(expected, actual); }
public void Given_Integer_ToFindMaximumIntegerUsingGenericClassExtentedMaxMethod_Given_MaximumIntValueAtFirstPosition_Should_ReturnExpectedValue() { //Arrange int[] intArray = { 30, 20, 10 }; int expected = 30; //Act MaximumNumberCheck.GenericMaximum <int> find = new MaximumNumberCheck.GenericMaximum <int>(intArray); int actual = find.MaxValue(); //Assert Assert.AreEqual(expected, actual); }