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); }
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); }
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"); }
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"); }
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); }
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); }