test: fixing tests to match System.CommandLine changes

This commit is contained in:
D. Moonfire 2022-09-06 17:21:09 -05:00
parent a1fa179206
commit 6a0b9d1e94
3 changed files with 18 additions and 0 deletions

View file

@ -21,6 +21,12 @@ namespace SampleTool
this.AddOption(this.messyOption); this.AddOption(this.messyOption);
} }
/// <inheritdoc />
public int Invoke(InvocationContext context)
{
return this.InvokeAsync(context).Result;
}
/// <inheritdoc /> /// <inheritdoc />
public Task<int> InvokeAsync(InvocationContext context) public Task<int> InvokeAsync(InvocationContext context)
{ {

View file

@ -25,6 +25,12 @@ public class LogCommand : Command, ICommandHandler
this.Handler = this; this.Handler = this;
} }
/// <inheritdoc />
public int Invoke(InvocationContext context)
{
return this.InvokeAsync(context).Result;
}
/// <inheritdoc /> /// <inheritdoc />
public Task<int> InvokeAsync(InvocationContext context) public Task<int> InvokeAsync(InvocationContext context)
{ {

View file

@ -39,6 +39,12 @@ namespace SampleTool
this.Handler = this; this.Handler = this;
} }
/// <inheritdoc />
public int Invoke(InvocationContext context)
{
return this.InvokeAsync(context).Result;
}
/// <inheritdoc /> /// <inheritdoc />
public Task<int> InvokeAsync(InvocationContext context) public Task<int> InvokeAsync(InvocationContext context)
{ {