public void TestAddThenExecuteCommand() { Assert.ThrowsException <ArgumentNullException>(() => _commandsManager.AddThenExecuteCommand(null)); var command = new CommandMock(); _commandsManager.AddThenExecuteCommand(command); Assert.AreSame(command, _undoStack.Pop()); Assert.AreEqual(_redoStack.Count, 0); Assert.IsTrue(command.IsCalledExecute); }