Search in sources :

Example 1 with SecurityCacheLoader

use of org.xwiki.security.authorization.cache.SecurityCacheLoader in project xwiki-platform by xwiki.

the class DefaultSecurityCacheLoaderTest method setUp.

@Before
public void setUp() throws Exception {
    XWikiBridge bridge = mocker.registerMockComponent(XWikiBridge.class);
    when(bridge.getMainWikiReference()).thenReturn(new WikiReference("wiki"));
    securityReferenceFactory = mocker.getInstance(SecurityReferenceFactory.class);
    mocker.registerMockComponent(SecurityCache.class);
    mocker.registerMockComponent(SecurityCacheRulesInvalidator.class);
    mocker.registerMockComponent(SecurityEntryReader.class);
    mocker.registerMockComponent(UserBridge.class);
    mocker.registerMockComponent(AuthorizationSettler.class);
    securityCacheLoader = mocker.getInstance(SecurityCacheLoader.class);
}
Also used : DefaultSecurityReferenceFactory(org.xwiki.security.DefaultSecurityReferenceFactory) SecurityReferenceFactory(org.xwiki.security.SecurityReferenceFactory) XWikiBridge(org.xwiki.security.internal.XWikiBridge) WikiReference(org.xwiki.model.reference.WikiReference) SecurityCacheLoader(org.xwiki.security.authorization.cache.SecurityCacheLoader) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 WikiReference (org.xwiki.model.reference.WikiReference)1 DefaultSecurityReferenceFactory (org.xwiki.security.DefaultSecurityReferenceFactory)1 SecurityReferenceFactory (org.xwiki.security.SecurityReferenceFactory)1 SecurityCacheLoader (org.xwiki.security.authorization.cache.SecurityCacheLoader)1 XWikiBridge (org.xwiki.security.internal.XWikiBridge)1