public void CancelAsync_When_IsAsych_Is_False() { //Arrange _fx = new SimpleFxBaseTestClass(Guid.NewGuid()); _fx.IsAsynch = false; //Act _fx.CancelAsync(); //Assert Assert.NotEqual(FxWorkerStatus.CancellationPending, _fx.WorkerStatus); }
public void CancelAsync_When_IsAsych_Is_True_And_IsBusy_Is_True() { //Arrange _fx = new SimpleFxBaseTestClass(Guid.NewGuid()); _fx.IsAsynch = true; _fx.AsynchOp = AsyncOperationManager.CreateOperation(null);// forces IsBusy to true //Act _fx.CancelAsync(); //Assert Assert.Equal(FxWorkerStatus.CancellationPending, _fx.WorkerStatus); }