Use mapper and improve validation

We have to use the repository mapper in order to fix missing fields contact and description in the created repository.
Use bean validation to ensure correct validation and require import url.
This commit is contained in:
Sebastian Sdorra
2020-12-03 10:46:43 +01:00
parent d0c84dec69
commit 0ade91ac85
4 changed files with 18 additions and 14 deletions

View File

@@ -153,7 +153,7 @@ public class RepositoryRootResourceTest extends RepositoryTestBase {
super.manager = repositoryManager;
RepositoryCollectionToDtoMapper repositoryCollectionToDtoMapper = new RepositoryCollectionToDtoMapper(repositoryToDtoMapper, resourceLinks);
super.repositoryCollectionResource = new RepositoryCollectionResource(repositoryManager, repositoryCollectionToDtoMapper, dtoToRepositoryMapper, resourceLinks, repositoryInitializer);
super.repositoryImportResource = new RepositoryImportResource(repositoryManager, serviceFactory, resourceLinks, eventBus);
super.repositoryImportResource = new RepositoryImportResource(repositoryManager, dtoToRepositoryMapper, serviceFactory, resourceLinks, eventBus);
dispatcher.addSingletonResource(getRepositoryRootResource());
when(serviceFactory.create(any(Repository.class))).thenReturn(service);
when(scmPathInfoStore.get()).thenReturn(uriInfo);