Search in sources :

Example 6 with RepositoryService

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);
}
Also used : RepositoryId(com.enonic.xp.repository.RepositoryId) RepositoryService(com.enonic.xp.repository.RepositoryService)

Aggregations

RepositoryService (com.enonic.xp.repository.RepositoryService)6 AuditLogConfig (com.enonic.xp.core.impl.audit.config.AuditLogConfig)3 IndexService (com.enonic.xp.index.IndexService)3 BeforeEach (org.junit.jupiter.api.BeforeEach)3 CreateRepositoryParams (com.enonic.xp.repository.CreateRepositoryParams)2 RepositoryId (com.enonic.xp.repository.RepositoryId)2 PropertyTree (com.enonic.xp.data.PropertyTree)1 CreateNodeParams (com.enonic.xp.node.CreateNodeParams)1 Node (com.enonic.xp.node.Node)1 NodeId (com.enonic.xp.node.NodeId)1 NodeIds (com.enonic.xp.node.NodeIds)1 NodeQuery (com.enonic.xp.node.NodeQuery)1 NodeService (com.enonic.xp.node.NodeService)1 Repository (com.enonic.xp.repository.Repository)1