Search in sources :

Example 1 with SecurityCacheRulesInvalidator

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

the class DefaultAuthorizationManagerIntegrationTest method initializeMocks.

@BeforeComponent
public void initializeMocks() throws Exception {
    cache = new TestCache<Object>();
    final CacheManager cacheManager = componentManager.registerMockComponent(CacheManager.class);
    when(cacheManager.createNewCache(any(CacheConfiguration.class))).thenReturn(cache);
    xWikiBridge = componentManager.registerMockComponent(XWikiBridge.class);
    userBridge = componentManager.registerMockComponent(UserBridge.class);
    securityEntryReader = componentManager.registerMockComponent(SecurityEntryReader.class);
    securityCacheRulesInvalidator = componentManager.registerMockComponent(SecurityCacheRulesInvalidator.class);
}
Also used : UserBridge(org.xwiki.security.internal.UserBridge) CacheManager(org.xwiki.cache.CacheManager) XWikiBridge(org.xwiki.security.internal.XWikiBridge) CacheConfiguration(org.xwiki.cache.config.CacheConfiguration) SecurityCacheRulesInvalidator(org.xwiki.security.authorization.cache.SecurityCacheRulesInvalidator) BeforeComponent(org.xwiki.test.annotation.BeforeComponent)

Aggregations

CacheManager (org.xwiki.cache.CacheManager)1 CacheConfiguration (org.xwiki.cache.config.CacheConfiguration)1 SecurityCacheRulesInvalidator (org.xwiki.security.authorization.cache.SecurityCacheRulesInvalidator)1 UserBridge (org.xwiki.security.internal.UserBridge)1 XWikiBridge (org.xwiki.security.internal.XWikiBridge)1 BeforeComponent (org.xwiki.test.annotation.BeforeComponent)1