use of org.alfresco.service.cmr.admin.RepoAdminService in project alfresco-repository by Alfresco.
the class InviteSenderTest method mockRepoAdminService.
private RepoAdminService mockRepoAdminService() {
RepoUsage usage = new RepoUsage(System.currentTimeMillis(), 10l, 100l, LicenseMode.ENTERPRISE, System.currentTimeMillis(), false);
RepoAdminService repoAdminService = mock(RepoAdminService.class);
when(repoAdminService.getRestrictions()).thenReturn(usage);
return repoAdminService;
}
use of org.alfresco.service.cmr.admin.RepoAdminService in project alfresco-repository by Alfresco.
the class InviteSenderTest method mockServices.
/**
* @return ServiceRegistry
*/
private ServiceRegistry mockServices() {
ActionService mockActionService = mockActionService();
NodeService mockNodeService = mockNodeService();
PersonService mockPersonService = mockPersonService();
SearchService mockSearchService = mockSearchService();
SiteService mockSiteService = mockSiteService();
FileFolderService mockFileFolderService = mockFileFolderService();
RepoAdminService mockRepoAdminService = mockRepoAdminService();
SysAdminParams sysAdminParams = new SysAdminParamsImpl();
ServiceRegistry services = mock(ServiceRegistry.class);
when(services.getActionService()).thenReturn(mockActionService);
when(services.getNodeService()).thenReturn(mockNodeService);
when(services.getPersonService()).thenReturn(mockPersonService);
when(services.getSearchService()).thenReturn(mockSearchService);
when(services.getSiteService()).thenReturn(mockSiteService);
when(services.getFileFolderService()).thenReturn(mockFileFolderService);
when(services.getSysAdminParams()).thenReturn(sysAdminParams);
when(services.getRepoAdminService()).thenReturn(mockRepoAdminService);
return services;
}
Aggregations