Ejemplo n.º 1
0
        public void SetErrorTest()
        {
            var job = new Job
            {
                AppID     = AppID,
                Created   = DateTime.Now,
                Status    = null,
                ProcessID = processID
            };

            job = jobDAL.SetJob(job);
            Assert.True(!string.IsNullOrWhiteSpace(job.JobID));

            var error  = "Test Error";
            var count  = jobDAL.SetError(job.ProcessID, job.JobID, error);
            var outJob = jobDAL.GetJob(job.JobID);

            jobDAL.Delete(new List <string> {
                job.JobID
            });

            Assert.NotNull(outJob);
            Assert.True(count == 1);
            Assert.Equal(JobStatus.Error, outJob.Status);
            Assert.Equal(error, outJob.Error);
        }