Exemple #1
0
		public void CommandCallsFinalize()
		{
			TestCommand cmd = new TestCommand();
			cmd.Finish += new EventHandler(OnFinish);
			cmd.BeginInvoke();
			WaitOnBool(ref _onFinishCalled);
		}
Exemple #2
0
        public void CommandCallsFinalize()
        {
            TestCommand cmd = new TestCommand();

            cmd.Finish += new EventHandler(OnFinish);
            cmd.BeginInvoke();
            WaitOnBool(ref _onFinishCalled);
        }
Exemple #3
0
		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 ?
		}
Exemple #4
0
        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 ?
        }