public void CanCallDisplayHelp() { var stdOut = new StdOutStringWriter(); _testClass.Console = stdOut; _testClass.DisplayHelp(); var result = stdOut.ToString(); Assert.NotEmpty(result); }
public void CanCallUseDescription() { var description = "TestValue255568780"; var stdOut = new StdOutStringWriter(); _testClass.Console = stdOut; _testClass.UseDescription(description); _testClass.DisplayHelp(); var result = stdOut.ToString(); Assert.NotEmpty(result); Assert.Contains(description, result); }
public void CanCallUseDefaultHelp() { var stdOut = new StdOutStringWriter(); _testClass.Console = stdOut; _testClass.UseDefaultHelp(); _testClass.DisplayHelp(); var result = stdOut.ToString(); Assert.NotEmpty(result); Assert.Equal( "Help:" + Environment.NewLine + "Key Description" + Environment.NewLine + "help Shows application help" + Environment.NewLine + "Arguments are parsed as" + Environment.NewLine + "Key:Value" + Environment.NewLine, result); }