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); } }
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); } }