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

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

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

            var progress = await jobDAL.GetProgressAsync(jobID);

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

            Assert.Equal(percent, progress.Percent);
            Assert.Equal(note, progress.Note);
            Assert.Equal(data, progress.Data);
        }