Exemple #1
0
            public void Should_Omit_Platform_Property_In_Process_Arguments_If_It_Is_Null()
            {
                // Given
                var fixture = new MSBuildRunnerFixture(false, true);

                // When
                fixture.Run();

                // Then
                fixture.AssertReceivedArguments("/m /v:normal /target:Build \"/Working/src/Solution.sln\"");
            }
Exemple #2
0
            public void Should_Use_Correct_Default_Target_In_Process_Arguments()
            {
                // Given
                var fixture = new MSBuildRunnerFixture(false, true);

                // When
                fixture.Run();

                // Then
                fixture.AssertReceivedArguments(
                    "/m /v:normal /target:Build \"/Working/src/Solution.sln\"");
            }
Exemple #3
0
            public void Should_Append_Platform_As_Property_To_Process_Arguments(PlatformTarget?platform, string argumentsString)
            {
                // Given
                var fixture = new MSBuildRunnerFixture(false, true);

                fixture.Settings.SetPlatformTarget(platform.Value);

                // When
                fixture.Run();

                // Then
                fixture.AssertReceivedArguments(argumentsString);
            }
Exemple #4
0
            public void Should_Append_Correct_Verbosity(Verbosity verbosity, string expected)
            {
                // Given
                var fixture = new MSBuildRunnerFixture(false, true);

                fixture.Settings.Verbosity = verbosity;

                // When
                fixture.Run();

                // Then
                fixture.AssertReceivedArguments(
                    "/m /v:{0} /target:Build \"/Working/src/Solution.sln\"", expected);
            }
Exemple #5
0
            public void Should_Append_Configuration_As_Property_To_Process_Arguments()
            {
                // Given
                var fixture = new MSBuildRunnerFixture(false, true);

                fixture.Settings.SetConfiguration("Release");

                // When
                fixture.Run();

                // Then
                fixture.AssertReceivedArguments(
                    "/m /v:normal /p:\"Configuration\"=\"Release\" /target:Build \"/Working/src/Solution.sln\"");
            }
Exemple #6
0
            public void Should_Use_Node_Reuse_If_Specified()
            {
                // Given
                var fixture = new MSBuildRunnerFixture(false, true);

                fixture.Settings.NodeReuse = true;

                // When
                fixture.Run();

                // Then
                fixture.AssertReceivedArguments(
                    "/m /v:normal /nr:true /target:Build \"/Working/src/Solution.sln\"");
            }
Exemple #7
0
            public void Should_Use_Specified_Number_Of_Max_Processors()
            {
                // Given
                var fixture = new MSBuildRunnerFixture(false, true);

                fixture.Settings.MaxCpuCount = 4;

                // When
                fixture.Run();

                // Then
                fixture.AssertReceivedArguments(
                    "/m:4 /v:normal /target:Build \"/Working/src/Solution.sln\"");
            }
Exemple #8
0
            public void Should_Use_As_Many_Processors_As_Possible_If_MaxCpuCount_Is_Zero()
            {
                // Given
                var fixture = new MSBuildRunnerFixture(false, true);

                fixture.Settings.MaxCpuCount = 0;

                // When
                fixture.Run();

                // Then
                fixture.AssertReceivedArguments(
                    "/m /v:normal /target:Build \"/Working/src/Solution.sln\"");
            }
Exemple #9
0
            public void Should_Append_Property_With_Multiple_Values_To_Process_Arguments()
            {
                // Given
                var fixture = new MSBuildRunnerFixture(false, true);

                fixture.Settings.WithProperty("A", "B", "E");
                fixture.Settings.WithProperty("C", "D");

                // When
                fixture.Run();

                // Then
                fixture.AssertReceivedArguments(
                    "/m /v:normal /p:\"A\"=\"B\" /p:\"A\"=\"E\" /p:\"C\"=\"D\" /target:Build \"/Working/src/Solution.sln\"");
            }
Exemple #10
0
            public void Should_Append_Targets_To_Process_Arguments()
            {
                // Given
                var fixture = new MSBuildRunnerFixture(false, true);

                fixture.Settings.WithTarget("A");
                fixture.Settings.WithTarget("B");

                // When
                fixture.Run();

                // Then
                fixture.AssertReceivedArguments(
                    "/m /v:normal /target:A;B \"/Working/src/Solution.sln\"");
            }
Exemple #11
0
            public void Should_Append_Property_To_Process_Arguments()
            {
                // Given
                var fixture = new MSBuildRunnerFixture(false, true);

                fixture.Settings.WithProperty("A", "B");
                fixture.Settings.WithProperty("C", "D");

                // When
                fixture.Run();

                // Then
                fixture.AssertReceivedArguments(
                    "/m /v:normal /p:A=B /p:C=D /target:Build \"/Working/src/Solution.sln\"");
            }