Ejemplo n.º 1
0
        public async Task ShouldNotWriteToDiskAndWriteToConsoleIfDryRun(ShellCompletionInstaller installer)
        {
            await installAutoCompleteCommand.Execute(new[] { $"--shell={installer.SupportedShell.ToString()}", "--dryRun" });

            fileSystem.DidNotReceive()
            .OverwriteFile(installer.ProfileLocation, Arg.Is <string>(arg => arg.Contains(installer.ProfileScript)));
            commandOutputProvider.Received()
            .Information(Arg.Is <string>(arg => arg.Contains(installer.ProfileScript)));
            fileSystem.ClearReceivedCalls();
            commandOutputProvider.ClearReceivedCalls();
        }