Beispiel #1
0
        public IEnumerable <Movie> Find(MovieSearchCriteria searchCriteria, int limit)
        {
            IEnumerable <Movie> movies = _repository.Find(
                filter: _movieSpecificationFactory.CreateSpecification(searchCriteria),
                orderBy: r => r.OrderBy(m => m.Title),
                limit: limit
                );

            return(movies);
        }
Beispiel #2
0
        public void Test_ReturnEmptySpecificationForEmptySearchCriteria()
        {
            MovieSearchCriteria searchCriteria = new MovieSearchCriteria();

            Assert.Throws <EmptySpecificationException>(() => factory.CreateSpecification(searchCriteria));
        }