public void Setup()
 {
     SearchService        = Substitute.For <ISearchService>();
     ImageAnalysisFactory = Substitute.For <ICognitiveImageAnalysisFactory>();
     TextAnalysisFactory  = Substitute.For <ICognitiveTextAnalysisFactory>();
     ReanalyzeAllFactory  = Substitute.For <IReanalyzeAllFactory>();
     DataService          = Substitute.For <ISitecoreDataService>();
 }
 public SearchService(
     ICognitiveSearchContext searcher,
     IImageDescriptionFactory imageDescriptionFactory,
     ICognitiveImageAnalysisFactory imageAnalysisFactory,
     ICognitiveTextAnalysisFactory textAnalysisFactory)
 {
     Searcher = searcher;
     ImageDescriptionFactory = imageDescriptionFactory;
     ImageAnalysisFactory    = imageAnalysisFactory;
     TextAnalysisFactory     = textAnalysisFactory;
 }
        public CognitiveAnalysisController(
            ISearchService searchService,
            ICognitiveImageAnalysisFactory iaFactory,
            ICognitiveTextAnalysisFactory taFactory,
            IReanalyzeAllFactory pFactory,
            ISitecoreDataService dataService)
        {
            Assert.IsNotNull(searchService, typeof(ISearchService));
            Assert.IsNotNull(iaFactory, typeof(ICognitiveImageAnalysisFactory));
            Assert.IsNotNull(taFactory, typeof(ICognitiveTextAnalysisFactory));
            Assert.IsNotNull(pFactory, typeof(IReanalyzeAllFactory));
            Assert.IsNotNull(dataService, typeof(ISitecoreDataService));

            SearchService        = searchService;
            ImageAnalysisFactory = iaFactory;
            TextAnalysisFactory  = taFactory;
            ReanalyzeAllFactory  = pFactory;
            DataService          = dataService;
        }