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

            var jobID2 = await jobDAL.AddAsync(AppID, "", "", "", () => Console.WriteLine("Hello World Test2!"));

            var jobs = await jobDAL.GetNonRunningJobsByIDsAsync(new List <string> {
                jobID, jobID2
            });

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

            var jobIDs = jobs.Select(j => j.JobID).ToList();

            Assert.True(jobs.Count == 2);
            Assert.True(jobIDs.Contains(jobID));
            Assert.True(jobIDs.Contains(jobID2));
        }