public ActionResult <IEnumerable <IndexOrderDto> > GetOrders() { var orders = _query.Get(); var items = _mapper.Map <IEnumerable <Order>, List <IndexOrderDto> >(orders); return(items); }
public void GetShouldReturnAll() { _orderList.Add(new Order { OrderId = _random.Next() }); var result = _query.Get().ToList(); result.Count.Should().Be(1); }