Ejemplo n.º 1
0
        public async Task GetJobViewsAsyncTest()
        {
            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.GetJobViewsAsync(1, 10);

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

            Assert.True(jobs.Total >= 2);
            var jobIDs = jobs.Items.Select(j => j.JobID).ToList();

            Assert.True(jobIDs.Contains(jobID));
            Assert.True(jobIDs.Contains(jobID2));
        }