public void CatchTest()
        {
            //arrange
            bool      catchFirst = false;
            Exception catchError = null;
            Exception doneError  = null;

            IPandaTask newtask = _task.Catch(ex =>
            {
                catchError = ex;
                catchFirst = !catchFirst;
            }).Fail(ex =>
            {
                doneError  = ex;
                catchFirst = true;
            });

            //act
            var testException = new Exception();

            _task.Reject(testException);

            //assert
            Assert.True(catchFirst);

            Assert.AreEqual(testException, doneError);
            Assert.AreEqual(testException, catchError);
            Assert.AreEqual(testException, newtask.Error);
        }
        public void ChainCatchTest()
        {
            //arrange
            var testTask   = new PandaTask <int>();
            var testTask2  = new PandaTask <int>();
            var resultTask = testTask.Catch(x => testTask2);

            //act
            const int testValue = 1;

            testTask.SetValue(testValue);

            //assert
            Assert.AreEqual(testValue, resultTask.Result);
        }