@@ -60,7 +60,7 @@ Future<void> disposeAnyRunningTest() async {
6060///
6161/// test('should render "Hello World" in all-caps', () async {
6262/// bed = bed.addProviders(const [
63- /// const Provider (TextFormatter, useClass: AllCapsTextFormatter),
63+ /// const ClassProvider (TextFormatter, AllCapsTextFormatter),
6464/// ]);
6565/// fixture = await bed.create();
6666/// expect(fixture.text, contains('HELLO WORLD'));
@@ -106,19 +106,12 @@ class NgTestBed<T extends Object> {
106106
107107 /// Create a new [NgTestBed] that uses the provided [component] factory.
108108 ///
109- /// Some APIs are not supported outside of [NgTestBed.useInitReflector] :
110- ///
111- /// * [addProviders] will throw [UnsupportedError] ; instead, the [addInjector]
112- /// API allows you to wrap the previous [Injector] , if any, to provide
113- /// additional services. In most cases just [rootInjector] is enough, and
114- /// you could re-use providers via [GenerateInjector] .
115- ///
116109 /// ```dart
117110 /// void main() {
118111 /// final ngTestBed = NgTestBed(
119112 /// SomeComponentNgFactory,
120- /// rootInjector: ([parent]) => new Injector.map({
121- /// Service: new Service(),
113+ /// rootInjector: ([parent]) => Injector.map({
114+ /// Service: Service(),
122115 /// }, parent),
123116 /// );
124117 /// }
0 commit comments