public void Test1() { var manager = new CommandManager(); var command = new MyFirstCommand("my command"); manager.Invoke(command); }
public void Test2() { var manager = new CommandManager(); var command = new MyFirstCommand(string.Empty); manager.Invoke(command); }
public void Test3() { var manager = new CommandManager(); var firstCommand = new MyFirstCommand("my first command"); var secondCommand = new MySecondCommand(1, "my second command"); manager.Invoke(firstCommand); manager.Invoke(secondCommand); manager.Undo(); }
public void WhenExecuted_CommandShouldReportSuccess() { // arrange var command = new MyFirstCommand(1, string.Empty); // act _dispatcher.Send(command); var inquiry = new Inquiry(_getCommandResult); var answer = inquiry.For(command); // assert Assert.IsTrue(answer.Success); }