Exemple #1
0
 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);
 }
Exemple #3
0
        public void RepgenRunResult_Okay_HasCorrectSequence()
        {
            RepgenRunResult result = RepgenRunResult.Okay(100, 0);

            result.Sequence.Should().Be(100);
        }
Exemple #4
0
        public void RepgenRunResult_Okay_HasCorrectRunTime()
        {
            RepgenRunResult result = RepgenRunResult.Okay(0, 200);

            result.RunTime.Should().Be(200);
        }
Exemple #5
0
        public void RepgenRunResult_Okay_HasCorrectRunStatus()
        {
            RepgenRunResult result = RepgenRunResult.Okay(0, 0);

            result.Status.Should().Be(RunStatus.Okay);
        }
Exemple #6
0
        public void RepgenRunResult_FileNotFound_HasCorrectRunStatus()
        {
            RepgenRunResult result = RepgenRunResult.FileNotFound();

            result.Status.Should().Be(RunStatus.FileNotFound);
        }
Exemple #7
0
        public void RepgenRunResult_Error_HasCorrectRunStatus()
        {
            RepgenRunResult result = RepgenRunResult.Error("Error");

            result.Status.Should().Be(RunStatus.Error);
        }
Exemple #8
0
        public void RepgenRunResult_Error_HasCorrectErrorMessageWhenNotBlank()
        {
            RepgenRunResult result = RepgenRunResult.Error("This is an error message.");

            result.ErrorMessage.Should().Be("This is an error message.");
        }
Exemple #9
0
 public void RepgenRunResult_ErrorWithNullMessage_ThrowsException()
 {
     Assert.Throws <ArgumentNullException>(
         () => { RepgenRunResult result = RepgenRunResult.Error(null); }
         );
 }
Exemple #10
0
        public void RepgenRunResult_Constructor_DefaultsSequenceToNegativeOne()
        {
            var result = new RepgenRunResult();

            result.Sequence.Should().Be(-1);
        }
Exemple #11
0
        public void RepgenRunResult_Cancelled_HasCorrectRunStatus()
        {
            RepgenRunResult result = RepgenRunResult.Cancelled();

            result.Status.Should().Be(RunStatus.Cancelled);
        }