public void It_should_print_bash_shell_script() { var console = new TestConsole(); SuggestionShellScriptHandler.Handle(console, "Bash"); console.Out.ToString().Should().Contain("_dotnet_bash_complete()"); }
public void It_should_print_powershell_shell_script() { var console = new TestConsole(); SuggestionShellScriptHandler.Handle(console, "PowerShell"); console.Out.ToString().Should().Contain("Register-ArgumentCompleter"); }
public void When_shellName_does_not_support_it_should_print_error() { var console = new TestConsole(); Action a = () => SuggestionShellScriptHandler.Handle(console, "notsupported"); a.Should().Throw <SuggestionShellScriptException>().And.Message.Should() .Contain("notsupported shell is not supported."); }