@@ -382,24 +382,24 @@ public async Task TransformToPowerShellCompliantOpenApiAsync()
382382 }
383383
384384 [ Fact ]
385- public void InvokeTransformCommand ( )
385+ public async Task InvokeTransformCommandAsync ( )
386386 {
387387 var rootCommand = Program . CreateRootCommand ( ) ;
388388 var openapi = Path . Combine ( "." , "UtilityFiles" , "SampleOpenApi.yml" ) ;
389389 var args = new [ ] { "transform" , "-d" , openapi , "-o" , "sample.json" , "--co" } ;
390390 var parseResult = rootCommand . Parse ( args ) ;
391- var handler = rootCommand . Subcommands . Where ( c => c . Name == "transform" ) . First ( ) . Handler ;
391+ var handler = rootCommand . Subcommands . First ( c => c . Name == "transform" ) . Handler ;
392392 var context = new InvocationContext ( parseResult ) ;
393393
394- handler ! . Invoke ( context ) ;
394+ await handler ! . InvokeAsync ( context ) ;
395395
396- var output = File . ReadAllText ( "sample.json" ) ;
396+ var output = await File . ReadAllTextAsync ( "sample.json" ) ;
397397 Assert . NotEmpty ( output ) ;
398398 }
399399
400400
401401 [ Fact ]
402- public void InvokeShowCommand ( )
402+ public async Task InvokeShowCommandAsync ( )
403403 {
404404 var rootCommand = Program . CreateRootCommand ( ) ;
405405 var openApi = Path . Combine ( "." , "UtilityFiles" , "SampleOpenApi.yml" ) ;
@@ -408,14 +408,14 @@ public void InvokeShowCommand()
408408 var handler = rootCommand . Subcommands . Where ( c => c . Name == "show" ) . First ( ) . Handler ;
409409 var context = new InvocationContext ( parseResult ) ;
410410
411- handler ! . Invoke ( context ) ;
411+ await handler ! . InvokeAsync ( context ) ;
412412
413- var output = File . ReadAllText ( "sample.md" ) ;
413+ var output = await File . ReadAllTextAsync ( "sample.md" ) ;
414414 Assert . Contains ( "graph LR" , output , StringComparison . Ordinal ) ;
415415 }
416416
417417 [ Fact ]
418- public void InvokePluginCommand ( )
418+ public async Task InvokePluginCommandAsync ( )
419419 {
420420 var rootCommand = Program . CreateRootCommand ( ) ;
421421 var manifest = Path . Combine ( "." , "UtilityFiles" , "exampleapimanifest.json" ) ;
@@ -424,9 +424,9 @@ public void InvokePluginCommand()
424424 var handler = rootCommand . Subcommands . Where ( c => c . Name == "plugin" ) . First ( ) . Handler ;
425425 var context = new InvocationContext ( parseResult ) ;
426426
427- handler ! . Invoke ( context ) ;
427+ await handler ! . InvokeAsync ( context ) ;
428428
429- using var jsDoc = JsonDocument . Parse ( File . ReadAllText ( "ai-plugin.json" ) ) ;
429+ using var jsDoc = JsonDocument . Parse ( await File . ReadAllTextAsync ( "ai-plugin.json" ) ) ;
430430 var openAiManifest = OpenAIPluginManifest . Load ( jsDoc . RootElement ) ;
431431
432432 Assert . NotNull ( openAiManifest ) ;
0 commit comments