Ejemplo n.º 1
0
 public void SetUp()
 {
     source       = new DisposedPromise <TWrapper <int> > ();
     doneCallback = new DoneCallback <TWrapper <int> > ();
     failCallback = new FailCallback();
     exceptions   = new List <Exception> ();
 }
Ejemplo n.º 2
0
 public void SetUp()
 {
     subject      = new RejectedPromise <TWrapper <int> > (new Exception());
     doneCallback = new DoneCallback <TWrapper <int> > ();
     failCallback = new FailCallback();
     exceptions   = new List <Exception> ();
 }
Ejemplo n.º 3
0
        public void ShouldCallDoneRegisteredBeforeResolved()
        {
            var deferred = new Deferred <TWrapper <int> >();
            var callback = new DoneCallback <TWrapper <int> >();

            deferred.Done(callback.Create());
            deferred.Resolve(3.Wrap());
            Assert.That(deferred.IsResolved, Is.True);
            Assert.That(callback.IsCalled, Is.True);
            Assert.That(callback.Result.val, Is.EqualTo(3));
        }
Ejemplo n.º 4
0
 public void SetUp()
 {
     doneCallback = new DoneCallback <TWrapper <int> > ();
     failCallback = new FailCallback();
     exceptions   = new List <Exception> ();
 }