public async Task ReturnsStoreWithIdFrom15To30_GivenStoresByIdListSpec() { var ids = Enumerable.Range(15, 16); var spec = new StoresByIdListSpec(ids); var stores = await storeRepository.ListAsync(spec); stores.Count.Should().Be(16); stores.OrderBy(x => x.Id).First().Id.Should().Be(15); stores.OrderBy(x => x.Id).Last().Id.Should().Be(30); }
public void ReturnsStoreWithIdFrom15To30_GivenStoresByIdListSpec() { var ids = Enumerable.Range(15, 16); var spec = new StoresByIdListSpec(ids); var stores = spec.Evaluate(StoreSeed.Get()); stores.Count().Should().Be(16); stores.OrderBy(x => x.Id).First().Id.Should().Be(15); stores.OrderBy(x => x.Id).Last().Id.Should().Be(30); }
public void ReturnsStoreWithIdFrom15To30_GivenStoresByIdListSpec() { var ids = Enumerable.Range(15, 16); var spec = new StoresByIdListSpec(ids); var stores = evaluator.GetQuery(StoreSeed.AsQueryable(), spec).ToList(); stores.Count.Should().Be(16); stores.OrderBy(x => x.Id).First().Id.Should().Be(15); stores.OrderBy(x => x.Id).Last().Id.Should().Be(30); }