Esempio n. 1
0
        public void Should_write_to_output()
        {
            //Given
            var mockOutput        = new Mock <IOutput>();
            var roverSquadControl = new MarsRoverSquadControl(mockOutput.Object);
            var input             = new List <string>()
            {
                "5 5", "1 1 N", "M"
            };

            //When
            roverSquadControl.SendCommand(input.AsEnumerable());

            //Then

            mockOutput.Verify(output => output.Debug(It.Is <string>(outputValue => outputValue == "1 2 N")));
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            var marsRoverSquadControl = new MarsRoverSquadControl(new ConsoleOutput(false));

            marsRoverSquadControl.SendCommand(FromConsoleInput().ToList());
        }