Beispiel #1
0
        public void GetValidMoveFromUser()
        {
            InputReader    inputReader    = new TestUserInputReader("1,1");
            InputValidator inputValidator = new PositionValidator();

            var inputHandler = new UserInputHandler();
            var result       = inputHandler.GetInput(inputReader, inputValidator);

            Assert.Equal("1,1", result);
        }
Beispiel #2
0
        public void GetInvalidMoveFromUser()
        {
            var orderedInputList = new List <string> {
                "j", ",2,2", "2,2", "1,1"
            };
            InputReader    inputReader    = new TestUserInputReader(orderedInputList);
            InputValidator inputValidator = new PositionValidator();

            var inputHandler = new UserInputHandler();
            var result       = inputHandler.GetInput(inputReader, inputValidator);

            Assert.Equal("2,2", result);
        }