use of com.enonic.xp.repository.RepositoryService in project xp by enonic.
the class GetRepositoryScriptTest method initialize.
@Override
public void initialize() throws Exception {
super.initialize();
repositoryService = Mockito.mock(RepositoryService.class);
Mockito.when(repositoryService.get(Mockito.any())).thenAnswer(invocation -> {
final RepositoryId repositoryId = (RepositoryId) invocation.getArguments()[0];
return Repository.create().id(repositoryId).branches(Branches.from(RepositoryConstants.MASTER_BRANCH)).build();
});
addService(RepositoryService.class, repositoryService);
}
Aggregations