@@ -53,7 +53,7 @@ describe('[TEST]: Computed fields', () => {
53
53
imports : [ NgxsModule . forRoot ( [ B ] ) , NgxsDataPluginModule . forRoot ( ) ]
54
54
} ) ;
55
55
56
- const b : B = TestBed . get < B > ( B ) ; // sequenceId = 0
56
+ const b : B = TestBed . inject < B > ( B ) ; // sequenceId = 0
57
57
58
58
expect ( b . snapshot ) . toEqual ( 'value' ) ;
59
59
expect ( b . snapshot ) . toEqual ( 'value' ) ;
@@ -122,7 +122,7 @@ describe('[TEST]: Computed fields', () => {
122
122
imports : [ NgxsModule . forRoot ( [ OrderLineState ] ) , NgxsDataPluginModule . forRoot ( ) ]
123
123
} ) ;
124
124
125
- const state : OrderLineState = TestBed . get < OrderLineState > ( OrderLineState ) ;
125
+ const state : OrderLineState = TestBed . inject < OrderLineState > ( OrderLineState ) ;
126
126
127
127
// noinspection DuplicatedCode
128
128
expect ( state . total ) . toEqual ( 0 ) ;
@@ -196,7 +196,7 @@ describe('[TEST]: Computed fields', () => {
196
196
imports : [ NgxsModule . forRoot ( [ ImmutableOrderLineState ] ) , NgxsDataPluginModule . forRoot ( ) ]
197
197
} ) ;
198
198
199
- const state : ImmutableOrderLineState = TestBed . get < ImmutableOrderLineState > ( ImmutableOrderLineState ) ;
199
+ const state : ImmutableOrderLineState = TestBed . inject < ImmutableOrderLineState > ( ImmutableOrderLineState ) ;
200
200
201
201
// noinspection DuplicatedCode
202
202
expect ( state . total ) . toEqual ( 0 ) ;
@@ -259,9 +259,9 @@ describe('[TEST]: Computed fields', () => {
259
259
imports : [ NgxsModule . forRoot ( [ A , B ] ) , NgxsDataPluginModule . forRoot ( ) ]
260
260
} ) ;
261
261
262
- const store : Store = TestBed . get < Store > ( Store ) ;
263
- const a : A = TestBed . get < A > ( A ) ;
264
- const b : B = TestBed . get < B > ( B ) ;
262
+ const store : Store = TestBed . inject < Store > ( Store ) ;
263
+ const a : A = TestBed . inject < A > ( A ) ;
264
+ const b : B = TestBed . inject < B > ( B ) ;
265
265
266
266
expect ( store . snapshot ( ) ) . toEqual ( { b : 0 , a : 0 } ) ;
267
267
expect ( a . snapshot ) . toEqual ( 0 ) ;
@@ -305,9 +305,9 @@ describe('[TEST]: Computed fields', () => {
305
305
imports : [ NgxsModule . forRoot ( [ A , B ] ) , NgxsDataPluginModule . forRoot ( ) ]
306
306
} ) ;
307
307
308
- const store : Store = TestBed . get < Store > ( Store ) ;
309
- const a : A = TestBed . get < A > ( A ) ;
310
- const b : B = TestBed . get < B > ( B ) ;
308
+ const store : Store = TestBed . inject < Store > ( Store ) ;
309
+ const a : A = TestBed . inject < A > ( A ) ;
310
+ const b : B = TestBed . inject < B > ( B ) ;
311
311
312
312
expect ( store . snapshot ( ) ) . toEqual ( { b : 0 , a : 0 } ) ;
313
313
expect ( a . snapshot ) . toEqual ( 0 ) ;
@@ -388,10 +388,10 @@ describe('[TEST]: Computed fields', () => {
388
388
imports : [ NgxsModule . forRoot ( [ A , B ] ) , NgxsDataPluginModule . forRoot ( ) ]
389
389
} ) ;
390
390
391
- const store : Store = TestBed . get ( Store ) ;
392
- const a : A = TestBed . get ( A ) ;
393
- const b : B = TestBed . get ( B ) ;
394
- const stream : NgxsDataSequence = TestBed . get ( NgxsDataSequence ) ;
391
+ const store : Store = TestBed . inject ( Store ) ;
392
+ const a : A = TestBed . inject ( A ) ;
393
+ const b : B = TestBed . inject ( B ) ;
394
+ const stream : NgxsDataSequence = TestBed . inject ( NgxsDataSequence ) ;
395
395
396
396
expect ( stream . sequenceValue ) . toEqual ( 1 ) ;
397
397
expect ( store . snapshot ( ) ) . toEqual ( { b : { value : 2 } , a : { value : 1 } } ) ;
@@ -490,8 +490,8 @@ describe('[TEST]: Computed fields', () => {
490
490
providers : [ MyFirstCountService ]
491
491
} ) ;
492
492
493
- const first : MyFirstCountService = TestBed . get ( MyFirstCountService ) ;
494
- const second : MySecondCountState = TestBed . get ( MySecondCountState ) ;
493
+ const first : MyFirstCountService = TestBed . inject ( MyFirstCountService ) ;
494
+ const second : MySecondCountState = TestBed . inject ( MySecondCountState ) ;
495
495
496
496
expect ( first . getValue ( ) ) . toEqual ( 0 ) ;
497
497
expect ( second . snapshot ) . toEqual ( 0 ) ;
@@ -559,8 +559,8 @@ describe('[TEST]: Computed fields', () => {
559
559
providers : [ MyFirstCountService ]
560
560
} ) ;
561
561
562
- const first : MyFirstCountService = TestBed . get ( MyFirstCountService ) ;
563
- const second : MySecondCountState = TestBed . get ( MySecondCountState ) ;
562
+ const first : MyFirstCountService = TestBed . inject ( MyFirstCountService ) ;
563
+ const second : MySecondCountState = TestBed . inject ( MySecondCountState ) ;
564
564
565
565
expect ( first . getValue ( ) ) . toEqual ( 0 ) ;
566
566
expect ( second . snapshot ) . toEqual ( 0 ) ;
0 commit comments