Example #1
0
            public void Should_Use_Parallel_Switch_If_Settings_Value_Is_Not_None(ParallelismOption option, string expected)
            {
                // Given
                var fixture = new XUnit2RunnerFixture();

                fixture.Settings.Parallelism = option;

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

                // Then
                Assert.Equal(expected, result.Args);
            }
Example #2
0
            public void Should_Use_Parallel_Switch_If_Settings_Value_Is_Not_None(ParallelismOption option, string expectedSwitch)
            {
                // Given
                var fixture = new XUnit2RunnerFixture();
                var runner  = fixture.CreateRunner();

                // When
                runner.Run("./Test1.dll", new XUnit2Settings
                {
                    Parallelism = option
                });

                // Then
                fixture.ProcessRunner.Received(1).Start(
                    Arg.Any <FilePath>(),
                    Arg.Is <ProcessSettings>(p =>
                                             p.Arguments.Render() == "\"/Working/Test1.dll\"" + expectedSwitch));
            }