refactor(tests): removed @IMPLEMENTS
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user