コード例 #1
0
ファイル: SimpleFxBaseFixture.cs プロジェクト: BgRva/Blob1
        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);
        }
コード例 #2
0
ファイル: SimpleFxBaseFixture.cs プロジェクト: BgRva/Blob1
        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);
        }