public void ShouldReturnSearchSettings(ISearchResults searchResults,[Substitute] SearchService service, SearchSettings searchSettings, ISearchServiceRepository serviceRepository, ISearchSettingsRepository settingsRepository, QueryRepository queryRepository,   IRenderingPropertiesRepository renderingPropertiesRepository, string query)
 {
     settingsRepository.Get(Arg.Any<string>()).Returns(searchSettings);
       var controller = new SearchController(serviceRepository, settingsRepository, queryRepository, renderingPropertiesRepository);
       var result = controller.SearchSettings(query) as ViewResult;
       result.Model.Should().BeOfType<SearchSettings>();
 }
 public void ShouldReturnGlobalSearch(ISearchResults searchResults, [Substitute] SearchService service, ISearchServiceRepository serviceRepository, ISearchSettingsRepository settingsRepository, QueryRepository queryRepository, IRenderingPropertiesRepository renderingPropertiesRepository, string query)
 {
     service.Search(Arg.Any<IQuery>()).Returns(searchResults);
       serviceRepository.Get().Returns(service);
       var controller = new SearchController(serviceRepository, settingsRepository, queryRepository, renderingPropertiesRepository);
       var result = controller.GlobalSearch() as ViewResult;
       result.Model.Should().As<ISearchResults>();
 }
 public void ShouldReturnPagedSearchResult([Substitute] SearchService service, ISearchServiceRepository serviceRepository, ISearchSettingsRepository settingsRepository, QueryRepository queryRepository, string query, ISearchResults searchResults, [Substitute] SearchController searchController, IRenderingPropertiesRepository renderingPropertiesRepository, [Substitute] PagingSettings pagingSettings)
 {
     renderingPropertiesRepository.Get<PagingSettings>().Returns(pagingSettings);
       service.Search(Arg.Any<IQuery>()).Returns(searchResults);
       serviceRepository.Get().Returns(service);
       var controller = new SearchController(serviceRepository, settingsRepository, queryRepository, renderingPropertiesRepository);
       var result = controller.PagedSearchResults(query, null) as ViewResult;
       result.Model.Should().BeOfType<PagedSearchResults>();
 }