refactor(router): rename LocationMock to LocationSpy

This commit is contained in:
Brian Ford 2015-05-01 15:43:54 -07:00
parent ef7014fe19
commit 68ed8f1b6b
3 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@ import {Location} from 'angular2/src/router/location';
@proxy @proxy
@IMPLEMENTS(Location) @IMPLEMENTS(Location)
export class DummyLocation extends SpyObject { export class SpyLocation extends SpyObject {
urlChanges:List<string>; urlChanges:List<string>;
_path:string; _path:string;
_subject:EventEmitter; _subject:EventEmitter;

View File

@ -25,7 +25,7 @@ import {Router, RouterOutlet, RouterLink, RouteConfig, RouteParams} from 'angula
import {DOM} from 'angular2/src/dom/dom_adapter'; 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 {Location} from 'angular2/src/router/location';
import {RouteRegistry} from 'angular2/src/router/route_registry'; import {RouteRegistry} from 'angular2/src/router/route_registry';
import {DirectiveMetadataReader} from 'angular2/src/core/compiler/directive_metadata_reader'; import {DirectiveMetadataReader} from 'angular2/src/core/compiler/directive_metadata_reader';
@ -39,7 +39,7 @@ export function main() {
Pipeline, Pipeline,
RouteRegistry, RouteRegistry,
DirectiveMetadataReader, DirectiveMetadataReader,
bind(Location).toClass(DummyLocation), bind(Location).toClass(SpyLocation),
bind(Router).toFactory((registry, pipeline, location) => { bind(Router).toFactory((registry, pipeline, location) => {
return new RootRouter(registry, pipeline, location, MyComp); return new RootRouter(registry, pipeline, location, MyComp);
}, [RouteRegistry, Pipeline, Location]) }, [RouteRegistry, Pipeline, Location])

View File

@ -12,7 +12,7 @@ import {Promise, PromiseWrapper} from 'angular2/src/facade/async';
import {Router, RootRouter} from 'angular2/src/router/router'; import {Router, RootRouter} from 'angular2/src/router/router';
import {Pipeline} from 'angular2/src/router/pipeline'; import {Pipeline} from 'angular2/src/router/pipeline';
import {RouterOutlet} from 'angular2/src/router/router_outlet'; 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 {Location} from 'angular2/src/router/location';
import {RouteRegistry} from 'angular2/src/router/route_registry'; import {RouteRegistry} from 'angular2/src/router/route_registry';
@ -29,7 +29,7 @@ export function main() {
Pipeline, Pipeline,
RouteRegistry, RouteRegistry,
DirectiveMetadataReader, DirectiveMetadataReader,
bind(Location).toClass(DummyLocation), bind(Location).toClass(SpyLocation),
bind(Router).toFactory((registry, pipeline, location) => { bind(Router).toFactory((registry, pipeline, location) => {
return new RootRouter(registry, pipeline, location, AppCmp); return new RootRouter(registry, pipeline, location, AppCmp);
}, [RouteRegistry, Pipeline, Location]) }, [RouteRegistry, Pipeline, Location])