Example #1
0
        public void ExecWorkerCleanUp_Throws_Ex_When_Exception_Param_Is_Null()
        {
            //Arrange
            _fx = new SimpleFxBaseTestClass(Guid.NewGuid());
            _fx.IsAsynch = true;

            //Act, Assert
            var ex = Assert.Throws<InvalidOperationException>(() => _fx.ExecWorkerCleanUp(null));
        }
Example #2
0
        public void ExecWorkerCleanUp_Throws_Ex_When_IsAsynch_Is_False()
        {
            //Arrange
            _fx = new SimpleFxBaseTestClass(Guid.NewGuid());
            _fx.IsAsynch = false;
            NullReferenceException ex = new NullReferenceException();

            //Act, Assert
            var x = Assert.Throws<FxExecutionErrorException>(() => _fx.ExecWorkerCleanUp(ex));
        }
Example #3
0
        public void ExecWorkerCleanUp()
        {
            //Arrange
            _fx = new SimpleFxBaseTestClass(Guid.NewGuid());
            _fx.IsAsynch = true;
            NullReferenceException ex = new NullReferenceException();

            //Act
            _fx.ExecWorkerCleanUp(ex);

            //Assert
            Assert.Equal(FxStatus.Error, _fx.Status);
            Assert.Equal(FxWorkerStatus.Error, _fx.WorkerStatus);
            Assert.True(_fx.CompletionCalled);
        }