public void RoundToNextNumber() { decimal valueToTest = 4.99M; string expected = "5"; string result = DecimalToFractions.Fractional(Convert.ToDecimal(valueToTest)); Assert.AreEqual(expected, result); }
public void ZeroTest() { decimal valueToTest = 0; string expected = "0"; string result = DecimalToFractions.Fractional(Convert.ToDecimal(valueToTest)); Assert.AreEqual(expected, result); }
public void RandomDecimalTest() { decimal valueToTest = 4.78M; string expected = "4 3/4"; string result = DecimalToFractions.Fractional(Convert.ToDecimal(valueToTest)); Assert.AreEqual(expected, result); }
public void WholeNumberTest() { decimal valueToTest = 4; string expected = "4"; string result = DecimalToFractions.Fractional(Convert.ToDecimal(valueToTest)); Assert.AreEqual(expected, result); }