use of org.eclipse.vorto.repository.utils.MockAppEventPublisher in project vorto by eclipse.
the class UnitTestBase method mockServices.
protected void mockServices() throws Exception {
ModelRepositoryEventListener supervisor = new ModelRepositoryEventListener();
IndexingEventListener indexingSupervisor = new IndexingEventListener(indexingService);
Collection<ApplicationListener<AppEvent>> listeners = new ArrayList<>();
listeners.add(supervisor);
listeners.add(indexingSupervisor);
ApplicationEventPublisher eventPublisher = new MockAppEventPublisher(listeners);
mockAccountService(eventPublisher);
mockUserService(eventPublisher);
mockModelParserFactory();
mockModelRepositoryFactory(eventPublisher);
supervisor.setRepositoryFactory(repositoryFactory);
modelParserFactory.setModelRepositoryFactory(repositoryFactory);
searchService = new SimpleSearchService(namespaceRepository, repositoryFactory);
supervisor.setSearchService(searchService);
this.modelValidationHelper = new ModelValidationHelper(repositoryFactory, this.accountService, userRepositoryRoleService, userNamespaceRoleService);
mockImporter(repositoryFactory);
this.workflow = new DefaultWorkflowService(repositoryFactory, accountService, notificationService, namespaceService, userNamespaceRoleService, roleService);
}
Aggregations