public GetPacksQueryHandlerTest() { searchPacksService = new Mock <ISearchPacksService>(); mapper = new Mock <IMapper>(); filteringData = new OrderFilteringData(); query = new GetPacksQuery(filteringData); queryHandler = new GetPacksQueryHandler(searchPacksService.Object, mapper.Object); packsToDelivery = new List <PackToDelivery>() { new PackToDelivery(), new PackToDelivery() }; packsDto = new List <GetPacksDto> { new GetPacksDto(), new GetPacksDto() }; }
public async Task <List <GetPacksDto> > Handle(GetPacksQuery request, CancellationToken cancellationToken) { var packs = await searchPacksService.SearchPacks(request.FilteringData); return(mapper.Map <List <GetPacksDto> >(packs)); }