2015-10-26 10:50:25 -07:00
|
|
|
import {ApplicationRef} from 'angular2/src/core/application_ref';
|
2015-12-03 09:06:42 -08:00
|
|
|
import {Injectable} from 'angular2/src/core/di';
|
2015-11-06 17:34:07 -08:00
|
|
|
import {Type} from 'angular2/src/facade/lang';
|
2015-10-26 10:50:25 -07:00
|
|
|
import {ComponentRef} from 'angular2/src/core/linker/dynamic_component_loader';
|
|
|
|
import {Provider, Injector} from 'angular2/src/core/di';
|
|
|
|
import {NgZone} from 'angular2/src/core/zone/ng_zone';
|
2015-11-06 17:34:07 -08:00
|
|
|
import {Promise} from 'angular2/src/facade/async';
|
2015-10-26 10:50:25 -07:00
|
|
|
|
2015-12-03 09:06:42 -08:00
|
|
|
@Injectable()
|
2015-10-26 10:50:25 -07:00
|
|
|
export class MockApplicationRef extends ApplicationRef {
|
|
|
|
registerBootstrapListener(listener: (ref: ComponentRef) => void): void {}
|
|
|
|
|
|
|
|
registerDisposeListener(dispose: () => void): void {}
|
|
|
|
|
|
|
|
bootstrap(componentType: Type, bindings?: Array<Type | Provider | any[]>): Promise<ComponentRef> {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
get injector(): Injector { return null; };
|
|
|
|
|
|
|
|
get zone(): NgZone { return null; };
|
|
|
|
|
|
|
|
dispose(): void {}
|
|
|
|
|
2015-10-28 10:34:13 -07:00
|
|
|
tick(): void {}
|
|
|
|
|
2015-10-26 10:50:25 -07:00
|
|
|
get componentTypes(): Type[] { return null; };
|
2015-12-03 09:06:42 -08:00
|
|
|
}
|