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"))); }
static void Main(string[] args) { var marsRoverSquadControl = new MarsRoverSquadControl(new ConsoleOutput(false)); marsRoverSquadControl.SendCommand(FromConsoleInput().ToList()); }