Пример #1
0
            public void Should_Not_Coerse_Mono_On_Windows_And_CoreClr()
            {
                // Given
                var fixture = new ProcessRunnerFixture(windows: true);

                fixture.GivenIsCoreClr();

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

                // Then
                Assert.Equal("\"/Program Files/Cake.exe\"", result.FileName);
            }
Пример #2
0
            public void Should_Not_Coerse_Mono_On_Unix_And_CoreClr_With_Config_NoMonoCoersion()
            {
                // Given
                var fixture = new ProcessRunnerFixture(windows: false);

                fixture.GivenIsCoreClr();
                fixture.GivenConfigNoMonoCoersion();

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

                // Then
                Assert.Equal("/Program Files/Cake.exe", result.FileName);
            }
Пример #3
0
            public void Should_Not_Coerse_Mono_On_Unix_And_CoreClr_If_Mono_Not_Resolved()
            {
                // Given
                var fixture = new ProcessRunnerFixture(windows: false);

                fixture.GivenIsCoreClr();
                fixture.GivenMonoNotResolved();

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

                // Then
                Assert.Equal("/Program Files/Cake.exe", result.FileName);
                fixture.Log
                .Received(1)
                .Write(Verbosity.Diagnostic, LogLevel.Verbose, "{0} is a .NET Framework executable, you might need to install Mono for it to execute successfully.", "/Program Files/Cake.exe");
            }
Пример #4
0
            public void Should_Coerse_Mono_On_Unix_And_CoreClr()
            {
                // Given
                var fixture = new ProcessRunnerFixture(windows: false);

                fixture.GivenIsCoreClr();

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

                // Then
                Assert.Equal("/Program Files/mono.exe", result.FileName);
                Assert.Equal("\"/Program Files/Cake.exe\"", result.Arguments);
                fixture.Log
                .Received(1)
                .Write(Verbosity.Diagnostic, LogLevel.Verbose, "{0} is a .NET Framework executable, will try execute using Mono.", "/Program Files/Cake.exe");
            }