public async Task Should_Retrieve_ASortedClientPage() { Dictionary <string, ListSortDirection> direction = new Dictionary <string, ListSortDirection> { { "Name", ListSortDirection.Ascending }, { "City", ListSortDirection.Descending } }; IMapper mapper = MapperField.GetMapper(); var sortedData = await _clientDataServices.GetSortedCollectionPagedAsync(direction, 1, 25); Assert.NotNull(sortedData); Assert.GreaterOrEqual(25, sortedData.Count()); }
/// <summary> /// OnSortCommand /// </summary> /// <param name="eventObject">Event Object to be used.</param> protected override void OnSortCommand(object eventObject) { var sortedDictionary = eventObject as Dictionary <string, ListSortDirection>; _clientTaskNotify = NotifyTaskCompletion.Create <IEnumerable <ClientSummaryExtended> >(_clientDataServices.GetSortedCollectionPagedAsync(sortedDictionary, 1, DefaultPageSize), _clientEventTask); }