Browse Source

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.
merge-requests/1/head
Craig Oates 7 years ago
parent
commit
5d8c839178
  1. 31
      Console.Waterworks/CW_Console/ConsoleCommands.cs

31
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
}
}

Loading…
Cancel
Save