public void WhenInactiveExecueIsCalledWithNullCommand() { var mockRobot = new Mock <IRobot>(); var mockCalculator = new Mock <ICalculator>(); var inactive = new Inactive(mockRobot.Object, mockCalculator.Object); Assert.Throws <ArgumentException>(() => inactive.Execute(null)); }
public void WhenInactiveExecueIsCalledWithNotNullCommandAndNullPositionIsNull() { var mockRobot = new Mock <IRobot>(); var mockCommand = new Mock <ICommand>(); var mockCalculator = new Mock <ICalculator>(); var inactive = new Inactive(mockRobot.Object, mockCalculator.Object); inactive.Execute(mockCommand.Object); mockCalculator.Verify(calc => calc.GetPositionAndState(It.IsAny <ICommand>())); }