p.location-badge.
exported from angular2/test
defined in angular2/src/test_lib/test_component_builder.ts (line 48)
:markdown
This module is used for writing tests for applications written in Angular.
This module is not included in the `angular2` module; you must import the test module explicitly.
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Injectable
pre.prettyprint
code.
@Injectable()
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(_injector: Injector)
:markdown
.l-sub-section
h3 overrideTemplate
pre.prettyprint
code.
overrideTemplate(componentType: Type, template: string)
:markdown
Overrides only the html of a ComponentMetadata
.
All the other properties of the component's ViewMetadata
are preserved.
.l-sub-section
h3 overrideView
pre.prettyprint
code.
overrideView(componentType: Type, view: ViewMetadata)
:markdown
Overrides a component's ViewMetadata
.
.l-sub-section
h3 overrideDirective
pre.prettyprint
code.
overrideDirective(componentType: Type, from: Type, to: Type)
:markdown
Overrides the directives from the component ViewMetadata
.
.l-sub-section
h3 overrideBindings
pre.prettyprint
code.
overrideBindings(type: Type, bindings: any[])
:markdown
Overrides one or more injectables configured via `bindings` metadata property of a directive or
component.
Very useful when certain bindings need to be mocked out.
The bindings specified via this method are appended to the existing `bindings` causing the
duplicated bindings to
be overridden.
.l-sub-section
h3 overrideViewBindings
pre.prettyprint
code.
overrideViewBindings(type: Type, bindings: any[])
:markdown
Overrides one or more injectables configured via `bindings` metadata property of a directive or
component.
Very useful when certain bindings need to be mocked out.
The bindings specified via this method are appended to the existing `bindings` causing the
duplicated bindings to
be overridden.
.l-sub-section
h3 createAsync
pre.prettyprint
code.
createAsync(rootComponentType: Type)
:markdown
Builds and returns a RootTestComponent.