public void CommandCanBeCancelled() { TestCommand cmd = new TestCommand(); cmd.BeginInvoke(); Thread.Sleep(10); Assert.IsFalse(cmd.Enabled); cmd.Cancel(); Assert.IsTrue(cmd.Canceling); WaitOnBool(ref cmd.wasCancelled); //no: it doesn't do this Assert.IsTrue(cmd.Enabled); //todo: I can't see a way to know that it ended, if you cancel it. //finish isn't called. Should it be ? }