示例#1
0
        public async Task UpdateProgressAsyncTest()
        {
            var jobID = await jobDAL.AddAsync(AppID, "", "", "", () => Console.WriteLine("Hello World Test1!"));

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

            await jobDAL.SetProgressAsync(jobID, null, null, null);

            var note    = "progress note";
            var data    = "progress data";
            var percent = 50;
            var count   = await jobDAL.UpdateProgressAsync(jobID, percent, note, data);

            var job = await jobDAL.GetJobViewAsync(jobID);

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

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