コード例 #1
0
ファイル: ReportUnitRunnerTests.cs プロジェクト: qhris/cake
            public void Should_Use_Provided_Files_In_Process_Arguments()
            {
                // Given
                var fixture = new ReportUnitFileFixture();

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

                // Then
                Assert.Equal("\"/temp/input.xml\" \"/temp/output.html\"", result.Args);
            }
コード例 #2
0
ファイル: ReportUnitRunnerTests.cs プロジェクト: qhris/cake
            public void Should_Find_ReportUnit_Runner()
            {
                // Given
                var fixture = new ReportUnitFileFixture();

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

                // Then
                Assert.Equal("/Working/tools/ReportUnit.exe", result.Path.FullPath);
            }
コード例 #3
0
ファイル: ReportUnitRunnerTests.cs プロジェクト: qhris/cake
            public void Should_Throw_If_Settings_Is_Null()
            {
                // Given
                var fixture = new ReportUnitFileFixture();

                fixture.Settings = null;

                // When
                var result = Record.Exception(() => fixture.Run());

                // Then
                Assert.IsArgumentNullException(result, "settings");
            }
コード例 #4
0
            public void Should_Throw_If_OutputFile_Is_Null()
            {
                // Given
                var fixture = new ReportUnitFileFixture();

                fixture.OutputFile = null;

                // When
                var result = Record.Exception(() => fixture.Run());

                // Then
                AssertEx.IsArgumentNullException(result, "outputFile");
            }
コード例 #5
0
ファイル: ReportUnitRunnerTests.cs プロジェクト: qhris/cake
            public void Should_Throw_If_Has_A_Non_Zero_Exit_Code()
            {
                // Given
                var fixture = new ReportUnitFileFixture();

                fixture.GivenProcessExitsWithCode(1);

                // When
                var result = Record.Exception(() => fixture.Run());

                // Then
                Assert.IsType <CakeException>(result);
                Assert.Equal("ReportUnit: Process returned an error (exit code 1).", result.Message);
            }
コード例 #6
0
ファイル: ReportUnitRunnerTests.cs プロジェクト: qhris/cake
            public void Should_Throw_If_Process_Was_Not_Started()
            {
                // Given
                var fixture = new ReportUnitFileFixture();

                fixture.GivenProcessCannotStart();

                // When
                var result = Record.Exception(() => fixture.Run());

                // Then
                Assert.IsType <CakeException>(result);
                Assert.Equal("ReportUnit: Process was not started.", result.Message);
            }