From 6a0b9d1e9428749aa6798e97e0b40e014cf22fd9 Mon Sep 17 00:00:00 2001 From: "D. Moonfire" Date: Tue, 6 Sep 2022 17:21:09 -0500 Subject: [PATCH] test: fixing tests to match System.CommandLine changes --- tests/SampleTool/CrashCommand.cs | 6 ++++++ tests/SampleTool/LogCommand.cs | 6 ++++++ tests/SampleTool/TableCommand.cs | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/tests/SampleTool/CrashCommand.cs b/tests/SampleTool/CrashCommand.cs index 51b2efb..8654510 100644 --- a/tests/SampleTool/CrashCommand.cs +++ b/tests/SampleTool/CrashCommand.cs @@ -21,6 +21,12 @@ namespace SampleTool this.AddOption(this.messyOption); } + /// + public int Invoke(InvocationContext context) + { + return this.InvokeAsync(context).Result; + } + /// public Task InvokeAsync(InvocationContext context) { diff --git a/tests/SampleTool/LogCommand.cs b/tests/SampleTool/LogCommand.cs index 45bda7a..e72e07f 100644 --- a/tests/SampleTool/LogCommand.cs +++ b/tests/SampleTool/LogCommand.cs @@ -25,6 +25,12 @@ public class LogCommand : Command, ICommandHandler this.Handler = this; } + /// + public int Invoke(InvocationContext context) + { + return this.InvokeAsync(context).Result; + } + /// public Task InvokeAsync(InvocationContext context) { diff --git a/tests/SampleTool/TableCommand.cs b/tests/SampleTool/TableCommand.cs index 193bdea..e8a2db7 100644 --- a/tests/SampleTool/TableCommand.cs +++ b/tests/SampleTool/TableCommand.cs @@ -39,6 +39,12 @@ namespace SampleTool this.Handler = this; } + /// + public int Invoke(InvocationContext context) + { + return this.InvokeAsync(context).Result; + } + /// public Task InvokeAsync(InvocationContext context) {