Ejemplo n.º 1
0
        public void Reset_Throws_Ex_If_IsBusy_Is_True()
        {
            //Arrange
            _fx = new SimpleFxBaseTestClass(Guid.NewGuid());
            _fx.IsAsynch = false;
            _fx.WorkerStatus = FxWorkerStatus.ExecutingSynch;// IsBusy returns true

            //Act, Assert
            var ex = Assert.Throws<InvalidOperationException>(() => _fx.Reset());
        }
Ejemplo n.º 2
0
        public void Reset()
        {
            //Arrange
            _fx = new SimpleFxBaseTestClass(Guid.NewGuid());
            _fx.IsAsynch = false;
            _fx.WorkerStatus = FxWorkerStatus.Completed;// IsBusy returns true

            //Act
            _fx.Reset();

            //Assert
            Assert.Null(_fx.AsynchOp);
            Assert.False(_fx.IsAsynch);
            Assert.Equal(FxWorkerStatus.Uninitialized, _fx.WorkerStatus);
            Assert.Equal(FxStatus.UnInitialized, _fx.Status);
            Assert.Equal(0, _fx.PercentProgress);
            Assert.False(_fx.CompletionCalled);
            Assert.False(_fx.IsValidContinue);
            Assert.Null(_fx.OutputException);
            Assert.Null(_fx.OutputMssg);
        }