public void StartRefresh() { Task <IEnumerable <BookingSummaryDto> > t = _bookingDataService.GetPagedSummaryDoAsync(1, 50); NotifyTaskCompletion.Create <IEnumerable <BookingSummaryDto> >(t, (sender, ev) => { if (SummaryView is IncrementalList <BookingSummaryDto> summary) { summary.Clear(); } OnPagedEvent(sender, ev); } ); }
public async Task Should_Load_PagedReservationSummary() { var numberOfItems = 0; using (var dbConnection = SqlExecutor.OpenNewDbConnection()) { var connection = await dbConnection.GetPagedAsync <RESERVAS1>(1, 25); numberOfItems = connection.Count(); } for (var i = 1; i < numberOfItems; i += 25) { var pagedItems = await _bookingDataServices.GetPagedSummaryDoAsync(i, 25); var numPages = pagedItems.Count(); Assert.AreEqual(numPages, 25); foreach (var item in pagedItems) { Assert.NotNull(item.BookingNumber); } } }