Beispiel #1
0
            public void Should_Use_Provided_Directories_In_Process_Arguments()
            {
                // Given
                var fixture = new ReportUnitDirectoryFixture();

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

                // Then
                Assert.Equal("\"/temp/input\" \"/temp/output\"", result.Args);
            }
Beispiel #2
0
            public void Should_Find_ReportUnit_Runner()
            {
                // Given
                var fixture = new ReportUnitDirectoryFixture();

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

                // Then
                Assert.Equal("/Working/tools/ReportUnit.exe", result.Path.FullPath);
            }
Beispiel #3
0
            public void Should_Throw_If_Settings_Is_Null()
            {
                // Given
                var fixture = new ReportUnitDirectoryFixture();

                fixture.Settings = null;

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

                // Then
                Assert.IsArgumentNullException(result, "settings");
            }
Beispiel #4
0
            public void Should_Throw_If_InputFolder_Is_Null()
            {
                // Given
                var fixture = new ReportUnitDirectoryFixture();

                fixture.InputFolder = null;

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

                // Then
                Assert.IsArgumentNullException(result, "inputFolder");
            }
Beispiel #5
0
            public void Should_Throw_If_Has_A_Non_Zero_Exit_Code()
            {
                // Given
                var fixture = new ReportUnitDirectoryFixture();

                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);
            }
Beispiel #6
0
            public void Should_Throw_If_Process_Was_Not_Started()
            {
                // Given
                var fixture = new ReportUnitDirectoryFixture();

                fixture.GivenProcessCannotStart();

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

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