示例#1
0
            public void Should_Redirect_Standard_Error()
            {
                var fixture = new NpmPackerFixture();

                fixture.Settings.RedirectStandardError = true;

                var result = fixture.Run();

                Assert.True(result.Process.RedirectStandardError);
            }
示例#2
0
            public void Should_Add_Mandatory_Arguments()
            {
                // Given
                var fixture = new NpmPackerFixture();

                // When
                var result = fixture.Run();

                // Then
                Assert.Equal("pack", result.Args);
            }
示例#3
0
            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);
            }
示例#4
0
            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");
            }
示例#5
0
            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);
            }
示例#6
0
            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);
            }