refactor(tests): removed @IMPLEMENTS

This commit is contained in:
vsavkin
2015-08-26 11:41:41 -07:00
parent 457eb5d69c
commit 343dcfa0c0
43 changed files with 402 additions and 426 deletions
+8 -20
View File
@@ -1,26 +1,12 @@
import {SpyObject, proxy} from 'angular2/test_lib';
import {IMPLEMENTS} from 'angular2/src/core/facade/lang';
import {EventEmitter, ObservableWrapper} from 'angular2/src/core/facade/async';
import {List, ListWrapper} from 'angular2/src/core/facade/collection';
import {Location} from 'angular2/src/router/location';
@proxy
@IMPLEMENTS(Location)
export class SpyLocation extends SpyObject {
urlChanges: List<string>;
_path: string;
_subject: EventEmitter;
_baseHref: string;
constructor() {
super();
this._path = '';
this.urlChanges = [];
this._subject = new EventEmitter();
this._baseHref = '';
}
export class SpyLocation implements Location {
urlChanges: List<string> = [];
_path: string = '';
_subject: EventEmitter = new EventEmitter();
_baseHref: string = '';
setInitialPath(url: string) { this._path = url; }
@@ -54,5 +40,7 @@ export class SpyLocation extends SpyObject {
ObservableWrapper.subscribe(this._subject, onNext, onThrow, onReturn);
}
noSuchMethod(m: any) { super.noSuchMethod(m); }
// TODO: remove these once Location is an interface, and can be implemented cleanly
platformStrategy: any = null;
normalize(url: string): string { return null; }
}