public void Should_Redirect_Standard_Error()
            {
                var fixture = new NpmSetToolFixture();

                fixture.Settings.RedirectStandardError = true;
                fixture.Settings.Key   = "progress";
                fixture.Settings.Value = "false";
                var result = fixture.Run();

                Assert.True(result.Process.RedirectStandardError);
            }
            public void Should_Throw_If_Settings_Are_Null()
            {
                // Given
                var fixture = new NpmSetToolFixture();

                fixture.Settings = null;

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

                // Then
                result.IsArgumentNullException("settings");
            }
            public void Should_Add_Mandatory_Arguments()
            {
                // Given
                var fixture = new NpmSetToolFixture();

                fixture.Settings.Key   = "progress";
                fixture.Settings.Value = "false";

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

                // Then
                result.Args.ShouldStartWith("set");
            }
            public void Should_Create_Set_Command_Arguments(string key, string value, bool global, string expected)
            {
                // Given
                var fixture = new NpmSetToolFixture();

                fixture.Settings.Key    = key;
                fixture.Settings.Value  = value;
                fixture.Settings.Global = global;

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

                // Then
                result.Args.ShouldEndWith(expected);
            }