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