public void Returns2CatalogItemsWithSameBrandAndTypeId() { var spec = new eShopWeb.ApplicationCore.Specifications.CatalogFilterPaginatedSpecification(0, 10, 1, 1); var result = GetTestCollection() .AsQueryable() .Where(spec.WhereExpressions.FirstOrDefault().Filter); Assert.NotNull(result); Assert.Equal(2, result.ToList().Count); }
public void ReturnsAllCatalogItems() { var spec = new eShopWeb.ApplicationCore.Specifications.CatalogFilterPaginatedSpecification(0, 10, null, null); var result = GetTestCollection() .AsQueryable() .Where(spec.WhereExpressions.FirstOrDefault()); Assert.NotNull(result); Assert.Equal(4, result.ToList().Count); }