public void AcceptsDecimalsInValidRange(string response, decimal min, decimal max, decimal expected) { var(stdOut, stdIn) = TestFx.ConsoleDefaults(); decimal result = TestFx.HandleValidDecimalResponse("", response, min, max); Assert.Equal(expected, result); TestFx.ResetConsole(stdOut, stdIn); }
public void ReturnsCorrectNumber(string prompt, string response, decimal expected) { var(stdOut, stdIn) = TestFx.ConsoleDefaults(); decimal result = TestFx.HandleValidDecimalResponse(prompt, response); Assert.Equal(expected, result); TestFx.ResetConsole(stdOut, stdIn); }