コード例 #1
0
 public async Task ReturnsListOfJobs()
 {
     using (var context = new TenantDataContext(_dbOptions))
     {
         var jobService = new Warehouse.Services.JobService(context);
         Assert.AreEqual(10, (await jobService.GetAllJobsAsync()).Count);
     }
 }
コード例 #2
0
        public async Task ReturnsCorrectJob()
        {
            using (var context = new TenantDataContext(_dbOptions))
            {
                var jobService = new Warehouse.Services.JobService(context);
                var id         = new Guid("0C8EBA6A-9765-43FB-A80D-A8C06D46AA2F");
                var job        = await jobService.GetJobAsync(id);

                job.Id.Should().Be(id);
            }
        }
コード例 #3
0
        public async Task ReturnsListOfValidJobs()
        {
            using (var context = new TenantDataContext(_dbOptions))
            {
                var jobService = new Warehouse.Services.JobService(context);
                var jobs       = await jobService.GetAllJobsAsync();

                foreach (var job in jobs)
                {
                    Assert.IsNotNull(job);
                }
            }
        }