@@ -329,6 +329,22 @@ void main() {
329329 test ('Test Not Found' , () {
330330 final container = IocContainerBuilder ().toContainer ();
331331 expect (
332+ () async => container.getAsync <A >(),
333+ throwsA (
334+ predicate (
335+ (exception) =>
336+ exception is ServiceNotFoundException <A > &&
337+ exception.message == 'Service A not found' &&
338+ exception.toString () ==
339+ 'ServiceNotFoundException: Service A not found' ,
340+ ),
341+ ),
342+ );
343+ });
344+
345+ test ('Test Not Found Async' , () async {
346+ final container = IocContainerBuilder ().toContainer ();
347+ await expectLater (
332348 () => container.get <A >(),
333349 throwsA (
334350 predicate (
@@ -572,7 +588,7 @@ void main() {
572588 try {
573589 //This allows cleanup, but this also causes the same effect as
574590 //expectLater or awaiting the future in the try block
575- //All the versions are different flavors of the same time, and
591+ //All the versions are different flavors of the same time, and
576592 //perhaps there is no way to use expect with a future without
577593 //causing a deadlock
578594 await future;
@@ -634,7 +650,8 @@ void main() {
634650 );
635651 });
636652
637- test ('Test Async Singleton Recovers From Error v3 - Full Try/Catch' , () async {
653+ test ('Test Async Singleton Recovers From Error v3 - Full Try/Catch' ,
654+ () async {
638655 var throwException = true ;
639656
640657 final builder = IocContainerBuilder ()
0 commit comments