@@ -180,7 +180,7 @@ void main() {
180
180
181
181
expect (
182
182
() => getIt.get <TestClassParam >(param1: 'abc' , param2: '3' ),
183
- throwsA (const TypeMatcher <TypeError >()),
183
+ throwsA (isA <TypeError >()),
184
184
);
185
185
});
186
186
@@ -195,7 +195,7 @@ void main() {
195
195
196
196
expect (
197
197
() => getIt.get <TestClassParam >(param2: '3' ),
198
- throwsA (const TypeMatcher <TypeError >()),
198
+ throwsA (isA <TypeError >()),
199
199
);
200
200
});
201
201
@@ -251,7 +251,7 @@ void main() {
251
251
await getIt.reset ();
252
252
expect (
253
253
() => getIt.get <TestClass >(),
254
- throwsA ( const TypeMatcher < StateError >()) ,
254
+ throwsStateError ,
255
255
);
256
256
257
257
expect (destructorCounter, 1 );
@@ -266,7 +266,7 @@ void main() {
266
266
await getIt.reset ();
267
267
expect (
268
268
() => getIt.get <TestClass >(),
269
- throwsA ( const TypeMatcher < StateError >()) ,
269
+ throwsStateError ,
270
270
);
271
271
272
272
expect (disposeCounter, 1 );
@@ -343,7 +343,7 @@ void main() {
343
343
344
344
expect (
345
345
() => getIt.get <int >(),
346
- throwsA ( const TypeMatcher < StateError >()) ,
346
+ throwsStateError ,
347
347
);
348
348
349
349
GetIt .I .reset ();
@@ -442,7 +442,7 @@ void main() {
442
442
443
443
expect (
444
444
() => getIt (instanceName: 'not there' ),
445
- throwsA (const TypeMatcher <AssertionError >()),
445
+ throwsA (isA <AssertionError >()),
446
446
);
447
447
GetIt .I .reset ();
448
448
});
@@ -702,7 +702,7 @@ void main() {
702
702
703
703
expect (
704
704
() => getIt.get <TestClass >(),
705
- throwsA ( const TypeMatcher < StateError >()) ,
705
+ throwsStateError ,
706
706
);
707
707
});
708
708
@@ -738,7 +738,7 @@ void main() {
738
738
739
739
expect (
740
740
() => getIt.get <TestClass >(),
741
- throwsA ( const TypeMatcher < StateError >()) ,
741
+ throwsStateError ,
742
742
);
743
743
});
744
744
@@ -773,7 +773,7 @@ void main() {
773
773
774
774
expect (
775
775
() => getIt.get <TestClass >(),
776
- throwsA ( const TypeMatcher < StateError >()) ,
776
+ throwsStateError ,
777
777
);
778
778
});
779
779
@@ -808,7 +808,7 @@ void main() {
808
808
809
809
expect (
810
810
() => getIt.get <TestClass >(),
811
- throwsA ( const TypeMatcher < StateError >()) ,
811
+ throwsStateError ,
812
812
);
813
813
});
814
814
@@ -839,7 +839,7 @@ void main() {
839
839
840
840
expect (
841
841
() => getIt.get <TestClass >(),
842
- throwsA ( const TypeMatcher < StateError >()) ,
842
+ throwsStateError ,
843
843
);
844
844
});
845
845
test ('testing reference counting' , () async {
@@ -880,7 +880,7 @@ void main() {
880
880
881
881
expect (
882
882
() => getIt.get <TestClass >(),
883
- throwsA ( const TypeMatcher < StateError >()) ,
883
+ throwsStateError ,
884
884
);
885
885
});
886
886
test ('testing reference counting - unregister' , () async {
@@ -921,7 +921,7 @@ void main() {
921
921
922
922
expect (
923
923
() => getIt.get <TestClass >(),
924
- throwsA ( const TypeMatcher < StateError >()) ,
924
+ throwsStateError ,
925
925
);
926
926
});
927
927
@@ -949,15 +949,15 @@ void main() {
949
949
950
950
expect (
951
951
() => getIt <TestClass >(instanceName: 'instanceName' ),
952
- throwsA ( const TypeMatcher < StateError >()) ,
952
+ throwsStateError ,
953
953
);
954
954
expect (
955
955
getIt <TestClass >(instanceName: 'instanceName2' ),
956
- const TypeMatcher <TestClass >(),
956
+ isA <TestClass >(),
957
957
);
958
958
expect (
959
959
getIt <TestClass2 >(instanceName: 'instanceName' ),
960
- const TypeMatcher <TestClass2 >(),
960
+ isA <TestClass2 >(),
961
961
);
962
962
});
963
963
@@ -984,7 +984,7 @@ void main() {
984
984
985
985
expect (
986
986
() => getIt.get <TestClass >(),
987
- throwsA ( const TypeMatcher < StateError >()) ,
987
+ throwsStateError ,
988
988
);
989
989
});
990
990
@@ -1011,7 +1011,7 @@ void main() {
1011
1011
1012
1012
expect (
1013
1013
() => getIt.get <TestClass >(),
1014
- throwsA ( const TypeMatcher < StateError >()) ,
1014
+ throwsStateError ,
1015
1015
);
1016
1016
});
1017
1017
@@ -1040,7 +1040,7 @@ void main() {
1040
1040
1041
1041
expect (
1042
1042
() => getIt.get <TestClassDisposable >(),
1043
- throwsA ( const TypeMatcher < StateError >()) ,
1043
+ throwsStateError ,
1044
1044
);
1045
1045
});
1046
1046
@@ -1061,7 +1061,7 @@ void main() {
1061
1061
1062
1062
expect (
1063
1063
() => getIt <TestClass >(instanceName: 'instanceName' ),
1064
- throwsA ( const TypeMatcher < StateError >()) ,
1064
+ throwsStateError ,
1065
1065
);
1066
1066
});
1067
1067
test ('change registration name with type and name' , () async {
@@ -1083,11 +1083,11 @@ void main() {
1083
1083
1084
1084
expect (
1085
1085
() => getIt <TestClass >(instanceName: 'instanceName' ),
1086
- throwsA ( const TypeMatcher < StateError >()) ,
1086
+ throwsStateError ,
1087
1087
);
1088
1088
expect (
1089
1089
getIt <TestClass >(instanceName: 'instanceName2' ),
1090
- const TypeMatcher <TestClass >(),
1090
+ isA <TestClass >(),
1091
1091
);
1092
1092
});
1093
1093
@@ -1108,7 +1108,7 @@ void main() {
1108
1108
newInstanceName: 'instanceNameExisting' ,
1109
1109
);
1110
1110
},
1111
- throwsA ( const TypeMatcher < StateError >()) ,
1111
+ throwsStateError ,
1112
1112
);
1113
1113
});
1114
1114
@@ -1131,11 +1131,11 @@ void main() {
1131
1131
1132
1132
expect (
1133
1133
() => getIt <TestClass >(instanceName: 'instanceName' ),
1134
- throwsA ( const TypeMatcher < StateError >()) ,
1134
+ throwsStateError ,
1135
1135
);
1136
1136
expect (
1137
1137
getIt <TestClass >(instanceName: 'instanceName2' ),
1138
- const TypeMatcher <TestClass >(),
1138
+ isA <TestClass >(),
1139
1139
);
1140
1140
});
1141
1141
@@ -1196,7 +1196,7 @@ void main() {
1196
1196
1197
1197
final Injector instance = GetIt .I <Injector >();
1198
1198
1199
- expect (instance, const TypeMatcher <Injector >());
1199
+ expect (instance, isA <Injector >());
1200
1200
});
1201
1201
1202
1202
test ('deregister in the same order of registering' , () async {
@@ -1257,7 +1257,7 @@ void main() {
1257
1257
1258
1258
expect (
1259
1259
() => getIt <TestClassDisposableWithDependency >(),
1260
- throwsA ( const TypeMatcher < StateError >()) ,
1260
+ throwsStateError ,
1261
1261
);
1262
1262
1263
1263
await getIt.unregister <TestClassDisposable >();
0 commit comments