Exemplo n.º 1
0
 public async void AllTasks()
 {
     using (var context = new FactoryContext(builder.Options)) {
         IMaintenanceTaskService maintenanceTaskService = new MaintenanceTaskService(context);
         PaginationOpts          paginationOpts         = new PaginationOpts();
         var mts = (await maintenanceTaskService.GetAll(paginationOpts)).ToList();
         Assert.NotNull(mts);
         Assert.NotEmpty(mts);
         Assert.Equal(50, mts.Count);
     }
 }
Exemplo n.º 2
0
        public async void TasksPaginationOptions()
        {
            var pageSize = 25;

            using (var context = new FactoryContext(builder.Options)) {
                IMaintenanceTaskService maintenanceTaskService = new MaintenanceTaskService(context);
                PaginationOpts          paginationOpts         = new PaginationOpts();
                paginationOpts.PageSize   = pageSize;
                paginationOpts.PageNumber = 5;
                var mts = (await maintenanceTaskService.GetAll(paginationOpts)).ToList();
                Assert.NotNull(mts);
                Assert.NotEmpty(mts);
                Assert.Equal(pageSize, mts.Count);
            }
        }