public void ShouldNotCallUnExecuteCommandIfCommandWasNotExecuted() { var command = new TestableUndoableCommand(); Assert.IsFalse(command.UnExecuteCommandCalled); command.UnExecute(); Assert.IsFalse(command.ExecuteCommandCalled); }
public void ShouldCallUnExecuteCommandWhenUnExecuting() { var command = new TestableUndoableCommand(); command.Execute(); Assert.IsFalse(command.UnExecuteCommandCalled); command.UnExecute(); Assert.IsTrue(command.UnExecuteCommandCalled); }
public void ShouldUnMarkCommandAsExecutedWhenUnExecuting() { var command = new TestableUndoableCommand(); command.Execute(); Assert.IsTrue(command.WasExecuted); command.UnExecute(); Assert.IsFalse(command.WasExecuted); }