public SearchController(ISearchServices searchServices, ICategoryServices categoryServices, ILocationServices locationServices, IReferenceServices referenceServices, IEmailServices emailService) : base(locationServices, referenceServices) { _searchServices = searchServices; _categoryServices = categoryServices; _emailService = emailService; }
public async Task should_return_actions_limited_by_top_modifier() { var query = new TrackActionQuery { ActionQuery = new ActionQuery { Top = 2 } }; ISearchServices searchServices = Substitute.For <ISearchServices>(); searchServices.FindActionsAsync(Arg.Any <ActionQuery>()).Returns(Task.FromResult(new[] { new Action(1, new DateTime(2001, 10, 2)), new Action(1, new DateTime(2001, 1, 2)), new Action(1, new DateTime(2001, 9, 2)) })); var sut = new TrackActionSearchService(searchServices, Options.Create(new BatchProcessingConfig())); var actions = await sut.FindActionsAsync(query); actions.ShouldBeEqualTo(new[] { new Action(1, new DateTime(2001, 10, 2)), new Action(1, new DateTime(2001, 9, 2)) }); }
public UserController(IProjectServices projectServices, ISearchServices searchServices, IUserServices userServices, ISerializer serializers) { projectService = projectServices; searchService = searchServices; userService = userServices; serializer = serializers; }
public RecipesController(ApplicationDbContext appDb, ICommentServices cServices, UserManager <AppUser> userManager, IUploadServices uploadServices, IRatingServices ratingServices, ISearchServices searchServices) { _userManager = userManager; _appDb = appDb; _cServices = cServices; _uploadServices = uploadServices; _ratingServices = ratingServices; _searchServices = searchServices; }
public AdminController( IAdministrationServices administrationServices, ISearchServices searchServices, IUserServices userServices) { this.administrationServices = administrationServices; this.searchServices = searchServices; this.userServices = userServices; }
public SearchTests() { var services = new ServiceCollection(); services.AddSingleton <IGetSearch, GetSearch>(); services.AddSingleton <ISearchServices, SearchServices>(); services.AddSingleton <IGetSearchServices, GetSearchServices>(); var provider = services.BuildServiceProvider(); _searchService = provider.GetService <ISearchServices>(); }
public AdminController( IAdministrationServices administrationServices, ISearchServices searchServices, IUserServices userServices, IReportsService reportsService) { this.administrationServices = administrationServices; this.searchServices = searchServices; this.userServices = userServices; this.reportsService = reportsService; }
public BookController(IBookServices bookServices, IResourceServices resourceServices, IWebHostEnvironment webHostEnvironment, IConfiguration configuration, ISearchServices searchServices) { _configuration = configuration; _resourceServices = resourceServices; _bookServices = bookServices; _searchServices = searchServices; _webHostEnvironment = webHostEnvironment; }
public async Task should_return_actions_by_account_and_contact_queries() { var query = new TrackActionQuery { AccountQuery = new AccountQuery(), ContactQuery = new ContactQuery() }; ISearchServices searchServices = Substitute.For <ISearchServices>(); searchServices.FindAccountsAsync(Arg.Any <AccountQuery>()).Returns(Task.FromResult(new[] { Task.FromResult(Enumerable.Range(0, 13).ToArray()) }.AsEnumerable())); searchServices.FindContactsAsync(Arg.Any <ContactQuery>()).Returns(Task.FromResult(new[] { Task.FromResult(Enumerable.Range(0, 11).ToArray()) }.AsEnumerable())); searchServices.FindActionsByAccountsAsync(Arg.Any <ActionQuery>(), Arg.Is <int[]>(accounts => accounts.Length == 13)).Returns(Task.FromResult(new[] { new Action(10, new DateTime(2001, 10, 2)), new Action(9, new DateTime(2001, 9, 2)) })); searchServices.FindActionsByContactsAsync(Arg.Any <ActionQuery>(), Arg.Is <int[]>(contacts => contacts.Length == 11)).Returns(Task.FromResult(new[] { new Action(9, new DateTime(2001, 9, 2)), new Action(1, new DateTime(2001, 1, 2)) })); TrackActionSearchService sut = new TrackActionSearchService(searchServices, Options.Create(new BatchProcessingConfig { BatchSize = 15 })); var actions = await sut.FindActionsAsync(query); actions.ShouldBeEqualTo(new[] { new Action(10, new DateTime(2001, 10, 2)), new Action(9, new DateTime(2001, 9, 2)), new Action(1, new DateTime(2001, 1, 2)) }); }
public SearchController(IFileUploadSystemData data, ISearchServices searchServices) : base(data) { this.searchServices = searchServices; }
public SearchController(ISearchServices searchServices, IToastNotification toast) { _searchServices = searchServices; _toast = toast; }
public GetSupportedEnginesQueryHandler(ISearchServices searchServices) { _searchServices = searchServices; }
public LoggedSearchService(Stopwatch sw, ISearchServices searchServices) { _sw = sw; _searchServices = searchServices; }
public SearchController(ISearchServices service) { _service = service; }
public AdminFilesController(IFileUploadSystemData data, ISearchServices searchServices, IUploadServices uploadServices) : base(data) { this.searchServices = searchServices; this.uploadServices = uploadServices; }
public SearchController(ISearchServices searchServices) { _searchServices = searchServices; }
public SearchController(IStreamusData data, ISearchServices services) : base(data) { this.services = services; }
public MediaItemsController(IStreamusData data, ISearchServices services) : base(data) { this.services = services; }
public TrackActionSearchService(ISearchServices searchServices, IOptions <BatchProcessingConfig> batchOptions) { _batchOptions = batchOptions; _searchServices = searchServices; }
public GetPositionNumberQueryHandler(ISearchServices searchServices) { _searchServices = searchServices; }
public SearchController(ISearchServices searchServices, IGenericSearchServices <BingSearchEngine> bingSearchServices, IGenericSearchServices <GoogleSearchEngine> googleSearchServices) { _searchServices = searchServices; _bingSearchServices = bingSearchServices; _googleSearchServices = googleSearchServices; }