Package org.springframework.security.core.userdetails.cache

Examples of org.springframework.security.core.userdetails.cache.EhCacheBasedUserCache.afterPropertiesSet()


    @Test
    public void cacheOperationsAreSuccessful() throws Exception {
        EhCacheBasedUserCache cache = new EhCacheBasedUserCache();
        cache.setCache(getCache());
        cache.afterPropertiesSet();

        // Check it gets stored in the cache
        cache.putUserInCache(getUser());
        assertEquals(getUser().getPassword(), cache.getUserFromCache(getUser().getUsername()).getPassword());
View Full Code Here


    @Test(expected = IllegalArgumentException.class)
    public void startupDetectsMissingCache() throws Exception {
        EhCacheBasedUserCache cache = new EhCacheBasedUserCache();

        cache.afterPropertiesSet();
        fail("Should have thrown IllegalArgumentException");

        Ehcache myCache = getCache();
        cache.setCache(myCache);
        assertEquals(myCache, cache.getCache());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.