use of com.tyndalehouse.step.core.models.AvailableFeatures in project step by STEPBible.
the class JSwordSearchServiceImplTest method setUp.
/**
* sets up search service
*/
@Before
public void setUp() {
final JSwordVersificationService mockVersificationService = TestUtils.mockVersificationService();
final PassageOptionsValidationService mockOptionsService = mock(PassageOptionsValidationService.class);
when(mockOptionsService.getAvailableFeaturesForVersion(any(String.class), any(List.class), any(String.class), any(InterlinearMode.class))).thenReturn(new AvailableFeatures());
this.search = new JSwordSearchServiceImpl(mockVersificationService, null, new JSwordPassageServiceImpl(mockVersificationService, null, null, null, TestUtils.mockVersionResolver(), mockOptionsService));
}
use of com.tyndalehouse.step.core.models.AvailableFeatures in project step by STEPBible.
the class SearchServiceImplTest method getSearchServiceUnderTest.
/**
* @return the search service to test
*/
private SearchServiceImpl getSearchServiceUnderTest() {
final JSwordMetadataService meta = mock(JSwordMetadataService.class);
final JSwordModuleService module = mock(JSwordModuleService.class);
final JSwordVersificationService versificationService = TestUtils.mockVersificationService();
final PassageOptionsValidationService optionsValidationService = mock(PassageOptionsValidationService.class);
final JSwordPassageServiceImpl jsword = new JSwordPassageServiceImpl(versificationService, null, null, null, TestUtils.mockVersionResolver(), optionsValidationService);
when(optionsValidationService.getAvailableFeaturesForVersion(any(String.class), any(List.class), any(String.class), any(InterlinearMode.class))).thenReturn(new AvailableFeatures());
when(module.isInstalled("ESV_th")).thenReturn(true);
when(module.isIndexed(any(String.class))).thenReturn(true);
when(meta.supportsFeature(any(String.class), any(LookupOption.class))).thenReturn(true);
final JSwordSearchServiceImpl jswordSearch = new JSwordSearchServiceImpl(versificationService, null, jsword);
subjects = new SubjectSearchServiceImpl(entityManager, jswordSearch, meta, module, versificationService);
return new SearchServiceImpl(jswordSearch, meta, versificationService, subjects, new TimelineServiceImpl(entityManager, jsword), null, entityManager, TestUtils.mockVersionResolver(), mock(LexiconDefinitionServiceImpl.class), null, null);
}
Aggregations