public void SourceStorageServiceCreationTest(StorageType storageType, StorageConfigModel configModel, Type storageServiceType) { IStorageFactory storageFactory = new SourceStorageFactory(); IStorageService storageService = storageFactory.CreateStorageService(storageType, configModel); Assert.Equal(storageServiceType, storageService.GetType()); }
private AutoCompleteBasedOnLucene GetAutocompleter(params IItem[] items) { if (items == null) { items = new IItem[] {} } ; var directoryFactory = new StaticDirectoryFactory(_directory); var source = new Source { Items = items }; var sourceStorage = new SourceStorageFactory(directoryFactory, _converterRepository, _learningRepository) { Sources = new[] { source } }; var searcher = new AutoCompleteBasedOnLucene(directoryFactory, sourceStorage, new DebugLogger(), _converterRepository); searcher.Configuration = new AutoCompleteConfiguration(); searcher.Converters = new[] { new TextItemConverter() }; return(searcher); }
public ProcessMonitor(SourceStorageFactory sourceStorageFactory) { _sourceStorageFactory = sourceStorageFactory; _source = new ProcessSource(); }