Exemplo n.º 1
0
        public void Filter(string nameFilter)
        {
            var repository = new FacilityRepository(_dbContext, _cache.Object, _logger.Object);
            var pagedItems = repository.Filter(1, 20, new OrderBySelector <Facility, string>(OrderByType.Ascending, f => f.Name),
                                               f => f.Name.Contains(nameFilter));

            Assert.NotEmpty(pagedItems.Items);
            Assert.True(pagedItems.Items.TrueForAll(f => f.Name.Contains(nameFilter)));
        }