Пример #1
0
        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);
        }
Пример #2
0
        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);
        }