コード例 #1
0
        public async Task SetCommandPauseAsyncTest()
        {
            var jobID = await jobDAL.AddAsync(AppID, "", "", "", () => Console.WriteLine("Hello World Test!"));

            await jobDAL.SetToRunningAsync(new List <string> {
                jobID
            });                                                         //only RUNNING jobs can be set to pause

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

            var job = await jobDAL.GetJobAsync(jobID);

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

            Assert.Equal(JobCommand.Pause, job.Command);
        }