refactor(router): rename LocationMock to LocationSpy
This commit is contained in:
parent
ef7014fe19
commit
68ed8f1b6b
|
@ -8,7 +8,7 @@ import {Location} from 'angular2/src/router/location';
|
|||
|
||||
@proxy
|
||||
@IMPLEMENTS(Location)
|
||||
export class DummyLocation extends SpyObject {
|
||||
export class SpyLocation extends SpyObject {
|
||||
urlChanges:List<string>;
|
||||
_path:string;
|
||||
_subject:EventEmitter;
|
||||
|
|
|
@ -25,7 +25,7 @@ import {Router, RouterOutlet, RouterLink, RouteConfig, RouteParams} from 'angula
|
|||
|
||||
import {DOM} from 'angular2/src/dom/dom_adapter';
|
||||
|
||||
import {DummyLocation} from 'angular2/src/mock/location_mock';
|
||||
import {SpyLocation} from 'angular2/src/mock/location_mock';
|
||||
import {Location} from 'angular2/src/router/location';
|
||||
import {RouteRegistry} from 'angular2/src/router/route_registry';
|
||||
import {DirectiveMetadataReader} from 'angular2/src/core/compiler/directive_metadata_reader';
|
||||
|
@ -39,7 +39,7 @@ export function main() {
|
|||
Pipeline,
|
||||
RouteRegistry,
|
||||
DirectiveMetadataReader,
|
||||
bind(Location).toClass(DummyLocation),
|
||||
bind(Location).toClass(SpyLocation),
|
||||
bind(Router).toFactory((registry, pipeline, location) => {
|
||||
return new RootRouter(registry, pipeline, location, MyComp);
|
||||
}, [RouteRegistry, Pipeline, Location])
|
||||
|
|
|
@ -12,7 +12,7 @@ import {Promise, PromiseWrapper} from 'angular2/src/facade/async';
|
|||
import {Router, RootRouter} from 'angular2/src/router/router';
|
||||
import {Pipeline} from 'angular2/src/router/pipeline';
|
||||
import {RouterOutlet} from 'angular2/src/router/router_outlet';
|
||||
import {DummyLocation} from 'angular2/src/mock/location_mock'
|
||||
import {SpyLocation} from 'angular2/src/mock/location_mock'
|
||||
import {Location} from 'angular2/src/router/location';
|
||||
|
||||
import {RouteRegistry} from 'angular2/src/router/route_registry';
|
||||
|
@ -29,7 +29,7 @@ export function main() {
|
|||
Pipeline,
|
||||
RouteRegistry,
|
||||
DirectiveMetadataReader,
|
||||
bind(Location).toClass(DummyLocation),
|
||||
bind(Location).toClass(SpyLocation),
|
||||
bind(Router).toFactory((registry, pipeline, location) => {
|
||||
return new RootRouter(registry, pipeline, location, AppCmp);
|
||||
}, [RouteRegistry, Pipeline, Location])
|
||||
|
|
Loading…
Reference in New Issue