Esempio n. 1
0
            public void Should_Not_Set_Target_Platform_If_Not_Enabled_In_Settings()
            {
                // Given
                var fixture = new ILMergeRunnerFixture();

                // When
                fixture.Run();

                // Then
                fixture.ProcessRunner.Received(1).Start(
                    Arg.Any <FilePath>(),
                    Arg.Is <ProcessSettings>(p =>
                                             p.Arguments.Render() == "/out:\"/Working/output.exe\" \"/Working/input.exe\""));
            }
Esempio n. 2
0
            public void Should_Set_Working_Directory()
            {
                // Given
                var fixture = new ILMergeRunnerFixture();

                // When
                fixture.Run();

                // Then
                fixture.ProcessRunner.Received(1).Start(
                    Arg.Any <FilePath>(),
                    Arg.Is <ProcessSettings>(p =>
                                             p.WorkingDirectory.FullPath == "/Working"));
            }
Esempio n. 3
0
            public void Should_Set_Target_Platform_Without_NETFramework_Path_If_Enabled_In_Settings()
            {
                // Given
                var fixture = new ILMergeRunnerFixture();

                fixture.Settings.TargetPlatform = new TargetPlatform(TargetPlatformVersion.v4);

                // When
                fixture.Run();

                // Then
                fixture.ProcessRunner.Received(1).Start(
                    Arg.Any <FilePath>(),
                    Arg.Is <ProcessSettings>(p =>
                                             p.Arguments.Render() ==
                                             "/out:\"/Working/output.exe\" /targetPlatform:v4 \"/Working/input.exe\""));
            }
Esempio n. 4
0
            public void Should_Set_Target_Platform_If_Enabled_In_Settings()
            {
                // Given
                const string path          = @"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1";
                var          directoryPath = new DirectoryPath(path);
                var          fixture       = new ILMergeRunnerFixture();

                fixture.Settings.TargetPlatform = new TargetPlatform(TargetPlatformVersion.v4, directoryPath);

                // When
                fixture.Run();

                // Then
                fixture.ProcessRunner.Received(1).Start(
                    Arg.Any <FilePath>(),
                    Arg.Is <ProcessSettings>(p =>
                                             p.Arguments.Render() ==
                                             "/out:\"/Working/output.exe\" /targetPlatform:v4,\"" + directoryPath.FullPath +
                                             "\" \"/Working/input.exe\""));
            }