Exemplo n.º 1
0
            public void Should_Add_Ignore_Existing_Flag_To_Arguments_If_Not_Null()
            {
                // Given
                var fixture = new OctopusDeployReleaseCreatorFixture();

                fixture.Settings.IgnoreExisting = true;

                // When
                fixture.CreateRelease();

                // Then
                fixture.ProcessRunner.Received(1).Start(
                    Arg.Any <FilePath>(),
                    Arg.Is <ProcessSettings>(p =>
                                             p.Arguments.Render() ==
                                             fixture.GetDefaultArguments() + " --ignoreexisting"));
            }
Exemplo n.º 2
0
            public void Should_Add_Release_Notes_To_Arguments_If_Not_Null()
            {
                // Given
                var fixture = new OctopusDeployReleaseCreatorFixture();

                fixture.Settings.ReleaseNotes = @"No significant changes in this version...";

                // When
                fixture.CreateRelease();

                // Then
                fixture.ProcessRunner.Received(1).Start(
                    Arg.Any <FilePath>(),
                    Arg.Is <ProcessSettings>(p =>
                                             p.Arguments.Render() ==
                                             fixture.GetDefaultArguments() + " --releasenotes \"No significant changes in this version...\""));
            }
Exemplo n.º 3
0
            public void Should_Add_Release_Notes_File_To_Arguments_If_Not_Null()
            {
                // Given
                var fixture = new OctopusDeployReleaseCreatorFixture();

                fixture.Settings.ReleaseNotesFile = @"some\folder\releaseNotes.txt";

                // When
                fixture.CreateRelease();

                // Then
                fixture.ProcessRunner.Received(1).Start(
                    Arg.Any <FilePath>(),
                    Arg.Is <ProcessSettings>(p =>
                                             p.Arguments.Render() ==
                                             fixture.GetDefaultArguments() + " --releasenotesfile \"/Working/some/folder/releaseNotes.txt\""));
            }
Exemplo n.º 4
0
            public void Should_Add_Default_Package_Version_To_Arguments_If_Not_Null()
            {
                // Given
                var fixture = new OctopusDeployReleaseCreatorFixture();

                fixture.Settings.DefaultPackageVersion = "1.5.2-beta";

                // When
                fixture.CreateRelease();

                // Then
                fixture.ProcessRunner.Received(1).Start(
                    Arg.Any <FilePath>(),
                    Arg.Is <ProcessSettings>(p =>
                                             p.Arguments.Render() ==
                                             fixture.GetDefaultArguments() + " --defaultpackageversion \"1.5.2-beta\""));
            }
Exemplo n.º 5
0
            public void Should_Add_Release_Number_To_Arguments_If_Not_Null()
            {
                // Given
                var fixture = new OctopusDeployReleaseCreatorFixture();

                fixture.Settings.ReleaseNumber = "3.0.0";

                // When
                fixture.CreateRelease();

                // Then
                fixture.ProcessRunner.Received(1).Start(
                    Arg.Any <FilePath>(),
                    Arg.Is <ProcessSettings>(p =>
                                             p.Arguments.Render() ==
                                             fixture.GetDefaultArguments() + " --releaseNumber \"3.0.0\""));
            }
Exemplo n.º 6
0
            public void Should_Add_Enable_Service_Messages_Flag_To_Arguments_If_Not_Null()
            {
                // Given
                var fixture = new OctopusDeployReleaseCreatorFixture();

                fixture.Settings.EnableServiceMessages = true;

                // When
                fixture.CreateRelease();

                // Then
                fixture.ProcessRunner.Received(1).Start(
                    Arg.Any <FilePath>(),
                    Arg.Is <ProcessSettings>(p =>
                                             p.Arguments.Render() ==
                                             fixture.GetDefaultArguments() + " --enableServiceMessages"));
            }
Exemplo n.º 7
0
            public void Should_Add_Configuration_File_To_Arguments_If_Not_Null()
            {
                // Given
                var fixture = new OctopusDeployReleaseCreatorFixture();

                fixture.Settings.ConfigurationFile = "configFile.txt";

                // When
                fixture.CreateRelease();

                // Then
                fixture.ProcessRunner.Received(1).Start(
                    Arg.Any <FilePath>(),
                    Arg.Is <ProcessSettings>(p =>
                                             p.Arguments.Render() ==
                                             fixture.GetDefaultArguments() + " --configFile \"/Working/configFile.txt\""));
            }
Exemplo n.º 8
0
            public void Should_Add_Password_To_Arguments_If_Not_Null()
            {
                // Given
                var fixture = new OctopusDeployReleaseCreatorFixture();

                fixture.Settings.Password = "******";

                // When
                fixture.CreateRelease();

                // Then
                fixture.ProcessRunner.Received(1).Start(
                    Arg.Any <FilePath>(),
                    Arg.Is <ProcessSettings>(p =>
                                             p.Arguments.Render() ==
                                             fixture.GetDefaultArguments() + " --password \"secret\""));
            }
Exemplo n.º 9
0
            public void Should_Add_Username_To_Arguments_If_Not_Null()
            {
                // Given
                var fixture = new OctopusDeployReleaseCreatorFixture();

                fixture.Settings.Username = "******";

                // When
                fixture.CreateRelease();

                // Then
                fixture.ProcessRunner.Received(1).Start(
                    Arg.Any <FilePath>(),
                    Arg.Is <ProcessSettings>(p =>
                                             p.Arguments.Render() ==
                                             fixture.GetDefaultArguments() + " --username \"mike123\""));
            }
Exemplo n.º 10
0
            public void Should_Add_Package_And_Step_To_Arguments_If_Specified()
            {
                // Given
                var fixture = new OctopusDeployReleaseCreatorFixture();

                fixture.Settings.Packages = new Dictionary <string, string>
                {
                    { "StepA", "1.0.1" }
                };

                // When
                fixture.CreateRelease();

                // Then
                fixture.ProcessRunner.Received(1).Start(
                    Arg.Any <FilePath>(),
                    Arg.Is <ProcessSettings>(p =>
                                             p.Arguments.Render() ==
                                             fixture.GetDefaultArguments() + " --package \"StepA:1.0.1\""));
            }