Ejemplo n.º 1
0
            public void Should_Redirect_Standard_Error()
            {
                var fixture = new NpmCiToolFixture();

                fixture.Settings.RedirectStandardError = true;

                var result = fixture.Run();

                Assert.True(result.Process.RedirectStandardError);
            }
Ejemplo n.º 2
0
            public void Should_Add_Mandatory_Arguments()
            {
                // Given
                var fixture = new NpmCiToolFixture();

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

                // Then
                Assert.Equal("ci", result.Args);
            }
Ejemplo n.º 3
0
            public void Should_Include_Production_Flag()
            {
                // Given
                var fixture = new NpmCiToolFixture();

                fixture.Settings.ForProduction();

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

                // Then
                Assert.Equal("ci --production", result.Args);
            }
Ejemplo n.º 4
0
            public void Should_Throw_If_Settings_Are_Null()
            {
                // Given
                var fixture = new NpmCiToolFixture();

                fixture.Settings = null;

                // When
                var result = Record.Exception(() => fixture.Run());

                // Then
                result.IsArgumentNullException("settings");
            }
Ejemplo n.º 5
0
            public void Should_Include_Registry_Args_If_Set()
            {
                // Given
                var fixture = new NpmCiToolFixture();

                fixture.Settings.FromRegistry(new Uri("https://myregistry/"));

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

                // Then
                Assert.Equal("ci --registry https://myregistry/", result.Args);
            }
Ejemplo n.º 6
0
            public void Should_Use_Cake_LogLevel_If_LogLevel_Is_Set_To_Default(
                Verbosity verbosity,
                string expected)
            {
                // Given
                var fixture = new NpmCiToolFixture();

                fixture.Settings.CakeVerbosityLevel = verbosity;

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

                // Then
                Assert.Equal(expected, result.Args);
            }
Ejemplo n.º 7
0
            public void Should_Add_LogLevel_To_Arguments_If_Not_Null(
                NpmLogLevel logLevel,
                string expected)
            {
                // Given
                var fixture = new NpmCiToolFixture();

                fixture.Settings.LogLevel = logLevel;

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

                // Then
                Assert.Equal(expected, result.Args);
            }