refactor(Completer): rename complete() to resolve()

This commit is contained in:
Victor Berchet
2015-02-25 12:46:50 +01:00
parent 6ad2c18277
commit 41c61e5bc7
8 changed files with 14 additions and 14 deletions

View File

@ -54,8 +54,8 @@ export function main() {
b.promise.then((_) => log.add('b then'));
});
a.complete("a");
b.complete("b");
a.resolve("a");
b.resolve("b");
PromiseWrapper.all([a.promise, b.promise]).then((_) => {
expect(log.result()).toEqual('onTurnStart; run start; onTurnDone; onTurnStart; a then; onTurnDone; onTurnStart; b then; onTurnDone');
@ -109,7 +109,7 @@ export function main() {
zone.run(function () {
PromiseWrapper.setTimeout(function () {
PromiseWrapper.setTimeout(function () {
c.complete(null);
c.resolve(null);
throw new BaseException('ccc');
}, 0);
}, 0);
@ -130,7 +130,7 @@ export function main() {
zone.run(function () {
PromiseWrapper.resolve(null).then((_) => {
return PromiseWrapper.resolve(null).then((__) => {
c.complete(null);
c.resolve(null);
throw new BaseException("ddd");
});
});
@ -152,7 +152,7 @@ export function main() {
zone.run(function () {
PromiseWrapper.setTimeout(function () {
PromiseWrapper.setTimeout(function () {
c.complete(null);
c.resolve(null);
throw new BaseException('ccc');
}, 0);
}, 0);