Exemplo n.º 1
0
        public void GetJobIdsByProcessAndCommandTest()
        {
            var job = new Job
            {
                AppID     = AppID,
                ProcessID = processID,
                Created   = DateTime.Now,
                Command   = null
            };

            job = jobDAL.SetJob(job);
            Assert.True(!string.IsNullOrWhiteSpace(job.JobID));

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

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

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

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