Пример #1
0
        public void It_should_print_bash_shell_script()
        {
            var console = new TestConsole();

            SuggestionShellScriptHandler.Handle(console, "Bash");
            console.Out.ToString().Should().Contain("_dotnet_bash_complete()");
        }
Пример #2
0
        public void It_should_print_powershell_shell_script()
        {
            var console = new TestConsole();

            SuggestionShellScriptHandler.Handle(console, "PowerShell");
            console.Out.ToString().Should().Contain("Register-ArgumentCompleter");
        }
Пример #3
0
        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.");
        }