public void SetUp() { this._indexSearchHttpMessageHandleMock = new Mock <HttpMessageHandler>(); this._lastClickAnalyticsHttpMessageHandleMock = new Mock <HttpMessageHandler>(); this._nearestDocumentsHttpMessageHandleMock = new Mock <HttpMessageHandler>(); this._nlpCallHttpMessageHandleMock = new Mock <HttpMessageHandler>(); this._documentFacetsHttpMessageHandleMock = new Mock <HttpMessageHandler>(); this._filterDocumentsHttpMessageHandleMock = new Mock <HttpMessageHandler>(); var indexSearchHttpClient = new HttpClient(this._indexSearchHttpMessageHandleMock.Object); var lastClickAnalyticsHttpClient = new HttpClient(this._lastClickAnalyticsHttpMessageHandleMock.Object); var nearestDocumentsHttpClient = new HttpClient(this._nearestDocumentsHttpMessageHandleMock.Object); var nlpCallHttpClient = new HttpClient(this._nlpCallHttpMessageHandleMock.Object); var documentFacetHttpClient = new HttpClient(this._documentFacetsHttpMessageHandleMock.Object); var filterDocumentsHttpClient = new HttpClient(this._filterDocumentsHttpMessageHandleMock.Object); var indexSearch = new IndexSearch(null, this._numberOfResults, indexSearchHttpClient, "https://localhost:5000", null); var lastClickAnalytics = new LastClickAnalytics(lastClickAnalyticsHttpClient, "https://localhost:5000"); var nearestDocuments = new NearestDocuments(nearestDocumentsHttpClient, "https://localhost:5000"); var nlpCall = new NlpCall(nlpCallHttpClient, this.GetIrrelevantIntents(), "https://localhost:5000", 0.5); var documentFacets = new DocumentFacets(documentFacetHttpClient, "https://localhost:5000"); var filterDocuments = new FilterDocuments(filterDocumentsHttpClient, "https://localhost:5000"); this._recommenderSettings = new RecommenderSettings { UseAnalyticsSearchRecommender = false, UseFacetQuestionRecommender = true, UseLongQuerySearchRecommender = true, UsePreprocessedQuerySearchRecommender = false, UseNearestDocumentsRecommender = false }; var suggestionsService = new SuggestionsService(indexSearch, lastClickAnalytics, documentFacets, nearestDocuments, filterDocuments, 7, 0.5, this._recommenderSettings); var contexts = new InMemoryContexts(new TimeSpan(1, 0, 0, 0)); var questionsService = new QuestionsService(); this._suggestionController = new SuggestionsController(suggestionsService, questionsService, nlpCall, contexts); }
public void SetUp() { this._indexSearchHttpMessageHandleMock = new Mock <HttpMessageHandler>(); this._nlpCallHttpMessageHandleMock = new Mock <HttpMessageHandler>(); this._documentFacetsHttpMessageHandleMock = new Mock <HttpMessageHandler>(); this._filterDocumentsHttpMessageHandleMock = new Mock <HttpMessageHandler>(); var indexSearchHttpClient = new HttpClient(this._indexSearchHttpMessageHandleMock.Object); var nlpCallHttpClient = new HttpClient(this._nlpCallHttpMessageHandleMock.Object); var documentFacetHttpClient = new HttpClient(this._documentFacetsHttpMessageHandleMock.Object); var filterDocumentHttpClient = new HttpClient(this._filterDocumentsHttpMessageHandleMock.Object); var indexSearch = new IndexSearch(null, this._numberOfResults, indexSearchHttpClient, "https://localhost:5000", this._organizationId); var nlpCall = new NlpCall(nlpCallHttpClient, "https://localhost:5000"); var documentFacets = new DocumentFacets(documentFacetHttpClient, "https://localhost:5000"); var filterDocuments = new FilterDocuments(filterDocumentHttpClient, "https://localhost:5000"); var suggestionsService = new SuggestionsService(indexSearch, nlpCall, documentFacets, filterDocuments, this.GetIrrelevantIntents()); var contexts = new InMemoryContexts(new TimeSpan(1, 0, 0, 0)); var questionsService = new QuestionsService(); this._suggestionController = new SuggestionsController(suggestionsService, questionsService, contexts); }