Пример #1
0
        public void SetToCompletedTest()
        {
            var job = new Job();

            job.AppID     = AppID;
            job.Created   = DateTime.Now;
            job.Status    = null;
            job.ProcessID = processID;
            job           = jobDAL.SetJob(job);
            Assert.True(!string.IsNullOrWhiteSpace(job.JobID));

            var count  = jobDAL.SetToCompleted(job.ProcessID, job.JobID);
            var outJob = jobDAL.GetJob(job.JobID);

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

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