public void TestMissingExecute () { ICommand command = new CommandWithoutExecute (); TestDelegate testDelegate = delegate() { command.Execute(); }; CommandException ex = Assert.Throws<CommandException> (testDelegate); Assert.That (ex.type == CommandExceptionType.EXECUTE_OVERRIDE); }
public void TestMissingExecute() { ICommand command = new CommandWithoutExecute(); TestDelegate testDelegate = delegate() { command.Execute(); }; CommandException ex = Assert.Throws <CommandException> (testDelegate); Assert.That(ex.type == CommandExceptionType.EXECUTE_OVERRIDE); }