public void ProjectionQuery_Ask_Success() { var spec = new UberProductSpec(); var q = new ProjectionQuery <UberProductSpec, Product, ProductDto>(_linqProvider, new StaticAutoMapperWrapper()); var res = q.Ask(spec); Assert.Equal(1, res.Count()); }
public void PagedQuery_Ask_TotalCountAndResultAreRight() { var spec = new UberProductSpec(); var res = _productQuery.AsPaged().Ask(spec); var nonPagedRes = _productQuery.Ask(spec); var totalCount = ((IQuery <UberProductSpec, int>)_productQuery).Ask(spec); Assert.Equal(1, res.TotalCount); Assert.Equal(res.TotalCount, totalCount); Assert.Equal(res.Count(), nonPagedRes.Count()); }