Package org.eurekastreams.server.persistence.mappers.cache.testhelpers

Examples of org.eurekastreams.server.persistence.mappers.cache.testhelpers.SimpleMemoryCache


     */
    @Before
    public void setup()
    {
        DomainGroup.setEntityCacheUpdater(null);
        cache = new SimpleMemoryCache();

        groupCacheLoader = new DomainGroupCacheLoader(new DomainGroupQueryStrategy());

        groupCacheLoader.setEntityManager(getEntityManager());

View Full Code Here


     * Setup method.
     */
    @Before
    public void setup()
    {
        cache = new SimpleMemoryCache();

        // Setup the cache loader to get dataset data into the cache.
        personCacheLoader = new PersonCacheLoader(new PersonQueryStrategy());
        personCacheLoader.setCache(cache);
        personCacheLoader.setEntityManager(getEntityManager());
View Full Code Here

     * Setup before each test.
     */
    @Before
    public void setUp()
    {
        cache = new SimpleMemoryCache();
        cache.set(KEY_PREFIX + KEY_VALUE, CACHE_DATA);
    }
View Full Code Here

     * Setup method to prepare the test suite.
     */
    @Before
    public void setup()
    {
        cache = new SimpleMemoryCache();

        domainGroupCacheLoader = new DomainGroupCacheLoader(new DomainGroupQueryStrategy());
        domainGroupCacheLoader.setCache(cache);
        domainGroupCacheLoader.setEntityManager(getEntityManager());
        domainGroupCacheLoader.initialize();
View Full Code Here

    @Test
    public void testExecute()
    {
        // settings we're storing in cache
        SystemSettings settings = new SystemSettings();
        SimpleMemoryCache cache = new SimpleMemoryCache();
        cache.set(CacheKeys.SYSTEM_SETTINGS, settings);

        // system under test
        FindSystemSettingsCacheDomainMapperImpl sut = new FindSystemSettingsCacheDomainMapperImpl();
        sut.setCache(cache);
View Full Code Here

    @Test
    public void testRefresh()
    {
        // system under test
        RefreshSystemSettingsCacheMapperImpl sut = new RefreshSystemSettingsCacheMapperImpl();
        SimpleMemoryCache cache = new SimpleMemoryCache();
        sut.setCache(cache);

        // settings we're storing in cache
        SystemSettings settings = new SystemSettings();

        // perform system under test
        sut.refresh(null, settings);

        // make sure the settings were stored in cache
        assertSame(settings, cache.get(CacheKeys.SYSTEM_SETTINGS));
    }
View Full Code Here

    @Before
    public void before()
    {
        // Need a multigetlist test.
        sut = new PartialCacheResultsMapper(suffixKeyTransformer, cacheKeyPrefix, false);
        cache = new SimpleMemoryCache();
        sut.setCache(cache);

        // setup cache key suffixes
        cacheKeySuffixes.add("one");
        cacheKeySuffixes.add("two");
View Full Code Here

     * Setup before each test.
     */
    @Before
    public void setUp()
    {
        cache = new SimpleMemoryCache();
        sut = new MultiSetKeyedSingleValueCacheMapper<Integer>(KEY_PREFIX);
        sut.setCache(cache);
    }
View Full Code Here

     * Setup before each test.
     */
    @Before
    public void setUp()
    {
        cache = new SimpleMemoryCache();
        sut = new SetKeyedSingleValueCacheMapper<Integer, String>(KEY_PREFIX);
        sut.setCache(cache);
    }
View Full Code Here

     * Setup method.
     */
    @Before
    public void setup()
    {
        cache = new SimpleMemoryCache();
        domainGroupCacheLoader = new DomainGroupCacheLoader(domainGroupQueryStrategy);
        domainGroupCacheLoader.setEntityManager(getEntityManager());
        domainGroupCacheLoader.setCache(cache);

        DomainGroup.setEntityCacheUpdater(null);
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.persistence.mappers.cache.testhelpers.SimpleMemoryCache

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.