public void IntFutureFailuer()
        {
            bool called = false;

            IFuture <int> success = Future.Failure <int>(new Exception());

            success.Recover((e) => { called = true; });

            Assert.That(called);
        }
        public void FutureDoubleFailureFlatRecoveCalledOnce()
        {
            var error = new Exception();

            var other = m_future.Map((x) => { return(x); }).FlatRecover((e) => Future.Failure <int>(error));

            m_promise.FulfillError(new Exception());

            int called = 0;

            other.Recover((e) => { called++; });

            Assert.AreEqual(1, called);
        }
        public void FutureDoubleFailureFlatRecoveCalled()
        {
            var error = new Exception();

            var other = m_future.Map((x) => { return(x); }).FlatRecover((e) => Future.Failure <int>(error));

            m_promise.FulfillError(new Exception());

            bool called = false;

            other.Recover((e) => { called = true; });

            Assert.That(called);
        }