Add test for commands without doclink

This commit is contained in:
Mikkel Nylander Bundgaard 2017-08-14 23:32:49 +02:00 committed by William Lee
parent 5ae335b592
commit 44d25ae3af

View file

@ -89,6 +89,19 @@ runtime-options:
cmd.StdOut.Should().ContainVisuallySameFragmentIfNotLocalized(HelpText);
}
[Theory]
[InlineData("complete")]
[InlineData("parse")]
public void WhenCommandWithoutDocLinkIsPassedToDotnetHelpItPrintsError(string command)
{
var cmd = new DotnetCommand()
.ExecuteWithCapturedOutput($"help {command}");
cmd.Should().Fail();
cmd.StdErr.Should().Contain(string.Format(Tools.Help.LocalizableStrings.CommandDoesNotExist, command));
cmd.StdOut.Should().ContainVisuallySameFragmentIfNotLocalized(HelpText);
}
[WindowsOnlyFact]
public void WhenRunOnWindowsDotnetHelpCommandShouldContainProperProcessInformation()
{