public void CommandCallsFinalize() { TestCommand cmd = new TestCommand(); cmd.Finish += new EventHandler(OnFinish); cmd.BeginInvoke(); WaitOnBool(ref _onFinishCalled); }
public void CommandCallsFinalize() { TestCommand cmd = new TestCommand(); cmd.Finish += new EventHandler(OnFinish); cmd.BeginInvoke(); WaitOnBool(ref _onFinishCalled); }
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 ? }
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 ? }