public async Task RetrieveAsync_ShouldReturnEmptyDataPage() { //arrange var dataRetriever = new InMemoryDataRetriever <FakeProjection>(Enumerable.Empty <FakeProjection>()); var predicates = Enumerable.Empty <Expression <Func <FakeProjection, bool> > >(); //act var result = await dataRetriever.RetrieveAsync(predicates, new [] { Sorting <FakeProjection> .Ascending(c => c.Id) }); //assert Assert.IsNotNull(result); Assert.AreEqual(0, result.TotalRecords); Assert.AreEqual(0, result.Data.Count()); }
public void Setup() { _fakeProjections = new[] { new FakeProjection { Id = 2, Name = "Abra" }, new FakeProjection { Id = 1, Name = "Abra-Cadabra" }, new FakeProjection { Id = 3, Name = "Oz" }, new FakeProjection { Id = 5, Name = "Buzz" }, }; _dataRetriever = new InMemoryDataRetriever <FakeProjection>(_fakeProjections); }