private TurtleGraphicsCommand CanMatchACommand(string commandText, string methodName) { // Arrange var turtleGraphicsReflectionMatcher = new TurtleGraphicsReflectionMatcher(_turtleGraphicsSystemStub, _turtleGraphicsControlStructuresSystemStub); // Act var returnedCommand = turtleGraphicsReflectionMatcher.Match(commandText); // Assert Assert.AreEqual(TurtleGraphicsCommandStatus.Valid, returnedCommand.Status); Assert.AreEqual(commandText, returnedCommand.CommandText); Assert.AreEqual(methodName, returnedCommand.ImplementingFunctionName); return returnedCommand; }
public void SetsCorrectStatusWhenInvalidCommand() { // Arrange var turtleGraphicsCommands = new TurtleGraphicsReflectionMatcher(_turtleGraphicsSystemStub, _turtleGraphicsControlStructuresSystemStub); // Act TurtleGraphicsCommand returnedCommand = turtleGraphicsCommands.Match(InvalidCommand); // Assert Assert.AreEqual(TurtleGraphicsCommandStatus.InvalidCommand, returnedCommand.Status); Assert.IsInstanceOfType(returnedCommand, typeof(TurtleGraphicsCommand)); }