예제 #1
0
        public void TestNullTaskResultsInValidPromise()
        {
            var resolved = false;
            var failed   = false;

            var promise = new Promise(null).Then(() => { resolved = true; }, e => { failed = true; });

            // Is immediately completed
            Assert(promise.Check());

            // A null task is always a failed promise
            Assert(!resolved);
            Assert(failed);
        }