public void Should_Redirect_Standard_Error() { var fixture = new NpmPackerFixture(); fixture.Settings.RedirectStandardError = true; var result = fixture.Run(); Assert.True(result.Process.RedirectStandardError); }
public void Should_Add_Mandatory_Arguments() { // Given var fixture = new NpmPackerFixture(); // When var result = fixture.Run(); // Then Assert.Equal("pack", result.Args); }
public void Should_Add_Source_To_Arguments_If_Not_Null() { // Given var fixture = new NpmPackerFixture(); fixture.Settings.Source = "c:\\mypackage"; // When var result = fixture.Run(); // Then Assert.Equal("pack \"c:\\mypackage\"", result.Args); }
public void Should_Throw_If_Settings_Are_Null() { // Given var fixture = new NpmPackerFixture(); fixture.Settings = null; // When var result = Record.Exception(() => fixture.Run()); // Then result.IsArgumentNullException("settings"); }
public void Should_Use_Cake_LogLevel_If_LogLevel_Is_Set_To_Default( Verbosity verbosity, string expected) { // Given var fixture = new NpmPackerFixture(); fixture.Settings.CakeVerbosityLevel = verbosity; // When var result = fixture.Run(); // Then Assert.Equal(expected, result.Args); }
public void Should_Add_LogLevel_To_Arguments_If_Not_Null( NpmLogLevel logLevel, string expected) { // Given var fixture = new NpmPackerFixture(); fixture.Settings.LogLevel = logLevel; // When var result = fixture.Run(); // Then Assert.Equal(expected, result.Args); }