public void Get_Paged_With_Place_Returns_Dogs_matching_Place() { // arrange const int placeId = 3; const string placeName = "Wallsend"; const int page = 1; const int pageSize = 5; _dogsRepository.Stub(x => x.GetAll()).Return( new DogSearchResultsListBuilder().ListWith30Dogs().Build().AsQueryable()); ConfigurationManager.AppSettings[AppSettingKeys.BaseUrlPagedDogs] = "localhost"; var dogsController = new DogsController( _dogsRepository, _breedsRepository, _unitofWork, _dogSearchhelper, _configuration, _placesRepository); _placesRepository.Stub(x => x.GetById(placeId)).Return( new Place { Name = placeName }); //act var result = dogsController.GetPaged(page, pageSize, placeId); Assert.That(result.TotalCount.Equals(3)); Assert.That(result.SearchDescription, Is.EqualTo( string.Format("Search results 1 to 3 out of 3 results for all breeds in {0}", placeName))); }