Ejemplo n.º 1
0
        public async Task GetJobIdsByProcessAndCommandAsyncTest()
        {
            var job = new Job
            {
                AppID     = AppID,
                ProcessID = processID,
                Created   = DateTime.Now,
                Command   = null
            };

            job = await jobDAL.SetJobAsync(job);

            Assert.True(!string.IsNullOrWhiteSpace(job.JobID));

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

            var outJobIDs = await jobDAL.GetJobIdsByProcessAndCommandAsync(processID, JobCommand.Stop);

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

            Assert.True(outJobIDs.Contains(job.JobID));
        }