public ServiceFixture() { ServiceUtils.Init(); _container = Container.GetInstance(); EntityExtractionService = _container.Resolve <EntityExtractionService>(); LanguageDetectionService = _container.Resolve <LanguageDetectionService>(); SentimentAnalysisService = _container.Resolve <SentimentAnalysisService>(); TextClassificationService = _container.Resolve <TextClassificationService>(); TextSimilarityService = _container.Resolve <TextSimilarityService>(); WikisearchService = _container.Resolve <WikisearchService>(); }
/// <summary> /// Initializes the services (it's based on the Dependency Injection pattern) /// </summary> private static void Init() { if (_container == null) { ServiceUtils.Init(); _container = Container.GetInstance(); _entityExtractionService = _container.Resolve <EntityExtractionService>(); _languageDetectionService = _container.Resolve <LanguageDetectionService>(); _sentimentAnalysisService = _container.Resolve <SentimentAnalysisService>(); _textClassificationService = _container.Resolve <TextClassificationService>(); _textSimilarityService = _container.Resolve <TextSimilarityService>(); _wikisearchService = _container.Resolve <WikisearchService>(); _customSpotService = _container.Resolve <CustomSpotService>(); _customModelService = _container.Resolve <CustomModelService>(); } }
public WikisearchValidationTests(ServiceFixture fixture) { _fixture = fixture; _wikisearchtextClassificationService = fixture.WikisearchService; }