From 5d8c8391785243035c76c9219ff4322d83b37aac Mon Sep 17 00:00:00 2001 From: Craig_Oates Date: Tue, 26 Sep 2017 01:13:42 +0100 Subject: [PATCH] Stubbed out test commands in the console project. Each command takes in a single and different parameter from the rest. This is in preparation for the addition of unit tests. I am unsure if the inclusion of unit tests will remain in this form at the moment. So, please check future commits before assuming they are still there. --- .../CW_Console/ConsoleCommands.cs | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/Console.Waterworks/CW_Console/ConsoleCommands.cs b/Console.Waterworks/CW_Console/ConsoleCommands.cs index 8cc8b86..f7505d4 100644 --- a/Console.Waterworks/CW_Console/ConsoleCommands.cs +++ b/Console.Waterworks/CW_Console/ConsoleCommands.cs @@ -6,6 +6,10 @@ namespace CW_Console { public class ConsoleCommands { + #region Demo-Methods + + // These command-methods are to show how a Console.Waterworks program typically looks. + [ListCommand()] [Description("Displays the Help section at run-time")] [Parameters("None")] @@ -15,7 +19,7 @@ namespace CW_Console CW_Liaison liaison = new CW_Liaison(); return liaison.RequestHelpDocumentation("CW_Console"); } - + [ListCommand()] [Description("Outputs to the console the command has been completed.")] [Parameters("None")] @@ -51,6 +55,7 @@ namespace CW_Console [Parameters("None")] [Usage("CW_Console> Quit")] public static void Quit() => Environment.Exit(-1); + #endregion #region Alias-Methods @@ -102,5 +107,29 @@ namespace CW_Console [Usage("CW_Console> quit")] public static void quit() => Quit(); #endregion + + #region Test-Methods + + // The command-methods are for testing purposes only. + // You can use them at run-time but they will not appear in the help section. + + // The template + // public static string paramTest(int param1) => $"Param: {param1}"; + public static string StringTest(string param1) => $"Param: {param1}"; + public static string Int16Test(Int16 param1) => $"Param: {param1}"; + public static string Int32Test(Int32 param1) => $"Param: {param1}"; + public static string Int64Test(Int64 param1) => $"Param: {param1}"; + public static string BooleanTest(bool param1) => $"Param: {param1}"; + public static string ByteTest(byte param1) => $"Param: {param1}"; + public static string CharTest(char param1) => $"Param: {param1}"; + public static string DateTimeTest(DateTime param1) => $"Param: {param1}"; + public static string DecimalTest(Decimal param1) => $"Param: {param1}"; + public static string SingleTest(Single param1) => $"Param: {param1}"; + public static string UInt16Test(UInt16 param1) => $"Param: {param1}"; + public static string UInt32Test(UInt32 param1) => $"Param: {param1}"; + public static string UInt64Test(UInt64 param1) => $"Param: {param1}"; + + + #endregion } }