public void AcceptsIntegersInValidRange(string response, int min, int max, int expected) { var(stdOut, stdIn) = TestFx.ConsoleDefaults(); int result = TestFx.HandleValidIntegerResponse("", response, min, max); Assert.Equal(expected, result); TestFx.ResetConsole(stdOut, stdIn); }
public void ReturnsCorrectInteger(string prompt, string response, int expected) { var(stdOut, stdIn) = TestFx.ConsoleDefaults(); int result = TestFx.HandleValidIntegerResponse(prompt, response); Assert.Equal(expected, result); TestFx.ResetConsole(stdOut, stdIn); }