public void GetDogsByBreed_filters_dogs_by_breed()
        {
            // arrange
                        var dogBreedFilterStrategy = MockRepository.GenerateMock<IDogBreedFilterStrategy>();
                        var dogSearchResultsListBuilder = new DogSearchResultsListBuilder();

                        dogBreedFilterStrategy.Stub(x => x.Filter(Arg<int>.Is.Anything)).Return(
                                dogSearchResultsListBuilder.ListOf14Beagels().Build().AsQueryable()
                                );

                        var dogSearchManager = new DogSearchService(dogBreedFilterStrategy
                                , _dogCategoryFilterStrategy
                                , _dogCategoryService
                                , _dogLocationFilterStrategy
                                , _configuration);

                        // act
                        var result = dogSearchManager.GetDogsByBreed(1);

                        // assert
                        dogBreedFilterStrategy.AssertWasCalled(x => x.Filter(1));
                        Assert.That(result.Count(), Is.EqualTo(14));
        }
        public void ApplyDogLocationFilteringAndSorting_filters_dogs_by_place()
        {
            // arrange
                        const int breedId = 3;
                        const int placeId = 1;

                        var dogBreedFilterStrategy = MockRepository.GenerateMock<IDogBreedFilterStrategy>();
                        var dogSearchResultsListBuilder = new DogSearchResultsListBuilder();
                        var dogs = dogSearchResultsListBuilder.ListOf14Beagels().Build().AsQueryable();
                        dogBreedFilterStrategy.Stub(x => x.Filter(breedId)).Return(dogs);

                        _dogCategoryService.Stub(x => x.AddDogsInSameCategoryToDogsCollection(dogs, breedId)).Return(dogs);
                        _dogLocationFilterStrategy.Stub(x => x.Filter(dogs, placeId)).Return(dogs);

                        var dogSearchManager = new DogSearchService(dogBreedFilterStrategy
                                , _dogCategoryFilterStrategy
                                , _dogCategoryService
                                , _dogLocationFilterStrategy
                                , _configuration);

                        // act
                        dogSearchManager.ApplyDogLocationFilteringAndSorting(dogs, breedId, _sortColumn, placeId);

                        // assert
                        _dogLocationFilterStrategy.AssertWasCalled(x => x.Filter(dogs, placeId));
        }