@@ -49,7 +49,7 @@ describe('HttpClient Backend Service', () => {
4949 ] ,
5050 } ) ;
5151
52- http = TestBed . get ( HttpClient ) ;
52+ http = TestBed . inject ( HttpClient ) ;
5353 } ) ;
5454
5555 it ( 'can get heroes' , waitForAsync ( ( ) => {
@@ -62,7 +62,7 @@ describe('HttpClient Backend Service', () => {
6262 } ) ) ;
6363
6464 it ( 'GET should be a "cold" observable' , waitForAsync ( ( ) => {
65- const httpBackend = TestBed . get ( HttpBackend ) ;
65+ const httpBackend = TestBed . inject < any > ( HttpBackend ) ;
6666 const spy = spyOn ( httpBackend , 'collectionHandler' ) . and . callThrough ( ) ;
6767 const get$ = http . get < Hero [ ] > ( 'api/heroes' ) ;
6868
@@ -88,7 +88,7 @@ describe('HttpClient Backend Service', () => {
8888 } ) ) ;
8989
9090 it ( 'Should only initialize the db once' , waitForAsync ( ( ) => {
91- const httpBackend = TestBed . get ( HttpBackend ) ;
91+ const httpBackend = TestBed . inject < any > ( HttpBackend ) ;
9292 const spy = spyOn ( httpBackend , 'resetDb' ) . and . callThrough ( ) ;
9393
9494 // Simultaneous backend.handler calls
@@ -252,7 +252,7 @@ describe('HttpClient Backend Service', () => {
252252 ] ,
253253 } ) ;
254254
255- http = TestBed . get ( HttpClient ) ;
255+ http = TestBed . inject ( HttpClient ) ;
256256 } ) ;
257257
258258 it ( 'can get heroes' , waitForAsync ( ( ) => {
@@ -377,7 +377,7 @@ describe('HttpClient Backend Service', () => {
377377 let heroService : HeroService ;
378378
379379 beforeEach ( ( ) => {
380- heroService = TestBed . get ( HeroService ) ;
380+ heroService = TestBed . inject ( HeroService ) ;
381381 } ) ;
382382
383383 it ( 'can get heroes' , waitForAsync ( ( ) => {
@@ -499,9 +499,9 @@ describe('HttpClient Backend Service', () => {
499499 ] ,
500500 } ) ;
501501
502- http = TestBed . get ( HttpClient ) ;
503- httpBackend = TestBed . get ( HttpBackend ) ;
504- interceptors = TestBed . get ( HTTP_INTERCEPTORS ) ;
502+ http = TestBed . inject ( HttpClient ) ;
503+ httpBackend = TestBed . inject < any > ( HttpBackend ) ;
504+ interceptors = TestBed . inject < any > ( HTTP_INTERCEPTORS ) ;
505505 } ) ;
506506
507507 // sanity test
@@ -560,8 +560,8 @@ describe('HttpClient Backend Service', () => {
560560 ] ,
561561 } ) ;
562562
563- http = TestBed . get ( HttpClient ) ;
564- httpBackend = TestBed . get ( HttpBackend ) ;
563+ http = TestBed . inject ( HttpClient ) ;
564+ httpBackend = TestBed . inject < any > ( HttpBackend ) ;
565565 createPassThruBackend = spyOn ( < any > httpBackend , 'createPassThruBackend' ) . and . callThrough ( ) ;
566566 } ) ;
567567
@@ -623,7 +623,7 @@ describe('HttpClient Backend Service', () => {
623623 ] ,
624624 } ) ;
625625
626- http = TestBed . get ( HttpClient ) ;
626+ http = TestBed . inject ( HttpClient ) ;
627627 } ) ;
628628
629629 it ( 'can get heroes (encapsulated)' , waitForAsync ( ( ) => {
0 commit comments