public void Move_IfCommandEmpty_NotCallSingleInvoker() { var instance = new MultipleCommandInvoker(SingleCommandInvoker.Object); instance.Move(string.Empty, null); SingleCommandInvoker.Verify(x => x.Move(It.IsAny <string>(), null), Times.Never); }
public void Move_CallMove_CallSingleInvokerSameCount() { string command = "TESTCOMMAND"; var instance = new MultipleCommandInvoker(SingleCommandInvoker.Object); instance.Move(command, null); SingleCommandInvoker.Verify(x => x.Move(It.IsAny <string>(), null), Times.AtLeast(command.Length)); SingleCommandInvoker.Verify(x => x.Move(It.IsAny <string>(), null), Times.AtMost(command.Length)); }
public void Move_IfCommandNull_ThrowsException() { var instance = new MultipleCommandInvoker(SingleCommandInvoker.Object); Assert.ThrowsException <NullReferenceException>(() => instance.Move(null, null)); }
public void Run(string commnad, VehicleContext vehicleContext) { commandInvoker.Move(commnad, vehicleContext); }