예제 #1
0
        public void SetProgressTest()
        {
            var jobID = jobDAL.Add(AppID, "", "", "", () => Console.WriteLine("Hello World Test1!"));

            Assert.True(!string.IsNullOrWhiteSpace(jobID));

            var note    = "progress note";
            var data    = "progress data";
            var percent = 50;
            var count   = jobDAL.SetProgress(jobID, percent, note, data);
            var job     = jobDAL.GetJobView(jobID);

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

            Assert.True(count == 1);
            Assert.Equal(percent, job.Percent);
            Assert.Equal(note, job.Note);
            Assert.Equal(data, job.Data);
        }