diff --git a/src/Chapter07.Tests/Listing07.32.Tests.cs b/src/Chapter07.Tests/Listing07.32.Tests.cs index fc034a79b..3d60673ff 100644 --- a/src/Chapter07.Tests/Listing07.32.Tests.cs +++ b/src/Chapter07.Tests/Listing07.32.Tests.cs @@ -18,7 +18,7 @@ public void ParseHelpCommand(string command) { command = item; IntelliTect.TestTools.Console.ConsoleAssert.Expect( - "Command Help...", () => Program.Main(command)); + "Command Help...", () => Program.Main(new[] { command })); } } @@ -31,7 +31,7 @@ public void ParseCatCommand(string command, string fileName) { command = $"{item}"; IntelliTect.TestTools.Console.ConsoleAssert.Expect( - $"Catalog '{fileName}'...", () => Program.Main(command, fileName)); + $"Catalog '{fileName}'...", () => Program.Main(new[] { command, fileName })); } } @@ -44,7 +44,7 @@ public void ParseCopyCommand(string command, string sourceFile, string targetFil { command = $"{item}"; IntelliTect.TestTools.Console.ConsoleAssert.Expect( - $"Copy '{sourceFile}' '{targetFile}'...", () => Program.Main(command, sourceFile, targetFile)); + $"Copy '{sourceFile}' '{targetFile}'...", () => Program.Main(new[] { command, sourceFile, targetFile })); } } diff --git a/src/Chapter07/Listing07.32.ListPatternMatching.cs b/src/Chapter07/Listing07.32.ListPatternMatching.cs index 35e163378..b4fdaed4c 100644 --- a/src/Chapter07/Listing07.32.ListPatternMatching.cs +++ b/src/Chapter07/Listing07.32.ListPatternMatching.cs @@ -5,18 +5,18 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter07.Listing07_32; public class Program { #region INCLUDE - public static void Main(params string[] args) + public static void Main(string[] args) { - // For simplicitly, commands are assumed + // For simplicity, options are assumed // to all be lower case. - // The first argument is the command and is + // The first argument is the option and is // identified by a '/', '-', or '--' prefix. switch (args) { case ["--help" or ['/' or '-', 'h' or '?']]: - // e.g. /?, -?, /h, -h, --help + // e.g. --help, /h, -h, /?, -? DisplayHelp(); break; case [ ['/' or '-', char command], ..]: