use of org.talend.dataquality.semantic.snapshot.DictionarySnapshotProvider in project data-prep by Talend.
the class AnalyzerServiceTest method setUp.
@Before
public void setUp() throws Exception {
LuceneIndex sharedDataDict = Mockito.mock(LuceneIndex.class);
LuceneIndex customDataDict = Mockito.mock(LuceneIndex.class);
DictionarySnapshot dictionarySnapshot = Mockito.mock(DictionarySnapshot.class);
when(dictionarySnapshot.getMetadata()).thenReturn(createMetadata());
when(dictionarySnapshot.getCustomDataDict()).thenReturn(customDataDict);
when(dictionarySnapshot.getSharedDataDict()).thenReturn(sharedDataDict);
when(dictionarySnapshot.getRegexClassifier()).thenReturn(new UserDefinedClassifier());
DictionarySnapshotProvider dictionarySnapshotProvider = Mockito.mock(DictionarySnapshotProvider.class);
when(dictionarySnapshotProvider.get()).thenReturn(dictionarySnapshot);
service = new AnalyzerService(dictionarySnapshotProvider);
}
Aggregations