public void Should_Add_Verbosity_To_Arguments_If_Set(NuGetVerbosity verbosity, string expected) { // Given var fixture = new NuGetPackerWithProjectFileFixture(); fixture.Settings.Verbosity = verbosity; // When var result = fixture.Run(); // Then Assert.Equal(expected, result.Args); }
public void Should_Add_Verbosity_To_Arguments_If_Set(NuGetVerbosity verbosity, string name, string expected) { // Given var fixture = new NuGetInstallerFromConfigFixture(); fixture.Settings.Verbosity = verbosity; // When var result = fixture.Run(); // Then Assert.Equal(expected, result.Args); }
public void Should_Add_Verbosity_To_Arguments_If_Not_Null(NuGetVerbosity verbosity, string expected) { // Given var fixture = new NuGetPusherFixture(); fixture.Settings.Verbosity = verbosity; // When var result = fixture.Run(); // Then Assert.Equal(expected, result.Args); }
public void Should_Add_Verbosity_To_Arguments_If_Set(NuGetVerbosity verbosity, string name, string expected) { // Given var fixture = new NuGetInstallerFixture(); fixture.Settings.Verbosity = verbosity; // When fixture.InstallFromConfig(); // Then fixture.ProcessRunner.Received(1).Start( Arg.Any <FilePath>(), Arg.Is <ProcessSettings>(p => p.Arguments.Render() == expected)); }
public void Should_Add_Verbosity_To_Arguments_If_Set(NuGetVerbosity verbosity, string name) { // Given var fixture = new NuGetFixture(); var restorer = fixture.CreateRestorer(); var expected = string.Format("restore \"/Working/project.sln\" -Verbosity {0} -NonInteractive", name); // When restorer.Restore("./project.sln", new NuGetRestoreSettings { Verbosity = verbosity }); // Then fixture.ProcessRunner.Received(1).Start(Arg.Is <ProcessStartInfo>( p => p.Arguments == expected)); }
public void Should_Add_Verbosity_To_Arguments_If_Not_Null(NuGetVerbosity verbosity, string name) { // Given var fixture = new NuGetFixture(); var pusher = fixture.CreatePusher(); var expected = string.Format("push \"/Working/existing.nupkg\" -NonInteractive -Verbosity {0}", name); // When pusher.Push("./existing.nupkg", new NuGetPushSettings { Verbosity = verbosity }); // Then fixture.ProcessRunner.Received(1).Start(Arg.Is <ProcessStartInfo>( p => p.Arguments == expected)); }
public NuGetCmdLineTask AddVerbosityArgument(NuGetVerbosity value) { args.Add("-Verbosity"); args.Add(value.ToString()); return(this); }