Package org.apache.jetspeed.cache.impl

Examples of org.apache.jetspeed.cache.impl.EhPortletWindowCache


        cacheMock.expects(once()).method("put").with(eq(element));
        cacheMock.expects(atLeastOnce()).method("get").with(eq(WINDOW_ID)).will(returnValue(element));
       
       
        Ehcache cache = (Ehcache) cacheMock.proxy();       
        PortletWindowCache windowCache = new EhPortletWindowCache(cache);     
        windowCache.putPortletWindow(window);
       
        assertNotNull(windowCache.getPortletWindow(WINDOW_ID));
        assertEquals(windowCache.getPortletWindow(WINDOW_ID), window);
       
        verify();
    }
View Full Code Here


        windowMock.expects(once()).method("getId").withNoArguments().will(returnValue(oid));
        windowMock.expects(once()).method("getPortletEntity").withNoArguments().will(returnValue(entityMock.proxy()));
        entityMock.expects(once()).method("getId").withNoArguments().will(returnValue(entityOid));
       
        Ehcache cache = (Ehcache) cacheMock.proxy();       
        PortletWindowCache windowCache = new EhPortletWindowCache(cache)
        windowCache.putPortletWindow(window);
       
        PortletWindow fromCache = windowCache.getPortletWindowByEntityId(ENTITY_ID);
        assertNotNull(fromCache);
       
        verify();       
    }
View Full Code Here

       
        cacheMock.expects(once()).method("removeQuiet").with(eq(WINDOW_ID)).will(returnValue(true));
       
       
        Ehcache cache = (Ehcache) cacheMock.proxy();       
        PortletWindowCache windowCache = new EhPortletWindowCache(cache)
        windowCache.putPortletWindow(window);
       
        windowCache.removePortletWindow(WINDOW_ID);
        assertNull(windowCache.getPortletWindowByEntityId(ENTITY_ID));
       
        verify();       
    }
View Full Code Here

       
        cacheMock.expects(atLeastOnce()).method("removeQuiet").with(eq(WINDOW_ID)).will(returnValue(true));
       
       
        Ehcache cache = (Ehcache) cacheMock.proxy();       
        PortletWindowCache windowCache = new EhPortletWindowCache(cache)
        windowCache.putPortletWindow(window);
       
        windowCache.removePortletWindowByPortletEntityId(ENTITY_ID);
        assertNull(windowCache.getPortletWindow(WINDOW_ID));
       
        verify();       
    }
View Full Code Here

        cacheMock.expects(once()).method("getKeys").withNoArguments().will(returnValue(keys));       
        cacheMock.expects(once()).method("get").with(eq(WINDOW_ID)).will(returnValue(new Element(WINDOW_ID, window)));
        cacheMock.expects(once()).method("get").with(eq("window2")).will(returnValue(new Element("window2", window2)));
        cacheMock.expects(once()).method("get").with(eq("window3")).will(returnValue(new Element("window3", window3)));
       
        PortletWindowCache windowCache = new EhPortletWindowCache((Ehcache) cacheMock.proxy());
       
        Set allPortletWindows = windowCache.getAllPortletWindows();
        assertNotNull(allPortletWindows);
        assertEquals(3, allPortletWindows.size());
    }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.cache.impl.EhPortletWindowCache

Copyright © 2018 www.massapicom. 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.