@ -52,20 +52,14 @@ var _nextRootElementId = 0;
|
||||
*/
|
||||
@Injectable()
|
||||
export class TestComponentBuilder {
|
||||
_bindingsOverrides: Map<Type, any[]>;
|
||||
_directiveOverrides: Map<Type, Map<Type, Type>>;
|
||||
_templateOverrides: Map<Type, string>;
|
||||
_viewBindingsOverrides: Map<Type, any[]>;
|
||||
_viewOverrides: Map<Type, ViewMetadata>;
|
||||
_bindingsOverrides = new Map<Type, any[]>();
|
||||
_directiveOverrides = new Map<Type, Map<Type, Type>>();
|
||||
_templateOverrides = new Map<Type, string>();
|
||||
_viewBindingsOverrides = new Map<Type, any[]>();
|
||||
_viewOverrides = new Map<Type, ViewMetadata>();
|
||||
|
||||
|
||||
constructor(private _injector: Injector) {
|
||||
this._bindingsOverrides = new Map();
|
||||
this._directiveOverrides = new Map();
|
||||
this._templateOverrides = new Map();
|
||||
this._viewBindingsOverrides = new Map();
|
||||
this._viewOverrides = new Map();
|
||||
}
|
||||
constructor(private _injector: Injector) {}
|
||||
|
||||
_clone(): TestComponentBuilder {
|
||||
var clone = new TestComponentBuilder(this._injector);
|
||||
@ -117,7 +111,7 @@ export class TestComponentBuilder {
|
||||
var clone = this._clone();
|
||||
var overridesForComponent = clone._directiveOverrides.get(componentType);
|
||||
if (!isPresent(overridesForComponent)) {
|
||||
clone._directiveOverrides.set(componentType, new Map());
|
||||
clone._directiveOverrides.set(componentType, new Map<Type, Type>());
|
||||
overridesForComponent = clone._directiveOverrides.get(componentType);
|
||||
}
|
||||
overridesForComponent.set(from, to);
|
||||
|
Reference in New Issue
Block a user