private void RunReportTest(string fileName) { var file = new File { Name = fileName, Type = FileType.RepGen }; RepgenRunResult result = _session.FileRun(file, (code, description) => responseBox.Text += string.Format("{0}: {1}\n", code, description), prompt => "", 3, JobComplete); }
public void RepgenRunResult_Constructor_DefaultsSequenceToNegativeOne() { var result = new RepgenRunResult(); result.Sequence.Should().Be(-1); }
public void RepgenRunResult_Okay_HasCorrectSequence() { RepgenRunResult result = RepgenRunResult.Okay(100, 0); result.Sequence.Should().Be(100); }
public void RepgenRunResult_Okay_HasCorrectRunTime() { RepgenRunResult result = RepgenRunResult.Okay(0, 200); result.RunTime.Should().Be(200); }
public void RepgenRunResult_Okay_HasCorrectRunStatus() { RepgenRunResult result = RepgenRunResult.Okay(0, 0); result.Status.Should().Be(RunStatus.Okay); }
public void RepgenRunResult_FileNotFound_HasCorrectRunStatus() { RepgenRunResult result = RepgenRunResult.FileNotFound(); result.Status.Should().Be(RunStatus.FileNotFound); }
public void RepgenRunResult_Error_HasCorrectRunStatus() { RepgenRunResult result = RepgenRunResult.Error("Error"); result.Status.Should().Be(RunStatus.Error); }
public void RepgenRunResult_Error_HasCorrectErrorMessageWhenNotBlank() { RepgenRunResult result = RepgenRunResult.Error("This is an error message."); result.ErrorMessage.Should().Be("This is an error message."); }
public void RepgenRunResult_ErrorWithNullMessage_ThrowsException() { Assert.Throws <ArgumentNullException>( () => { RepgenRunResult result = RepgenRunResult.Error(null); } ); }
public void RepgenRunResult_Constructor_DefaultsSequenceToNegativeOne() { var result = new RepgenRunResult(); result.Sequence.Should().Be(-1); }
public void RepgenRunResult_Cancelled_HasCorrectRunStatus() { RepgenRunResult result = RepgenRunResult.Cancelled(); result.Status.Should().Be(RunStatus.Cancelled); }