Package org.castor.cache

Examples of org.castor.cache.CacheFactory


        String classname = "org.castor.cache.distributed.CoherenceCache";
        assertEquals(classname, cf.getCacheClassName());
    }

    public void testGetCache() {
        CacheFactory cf = new CoherenceCacheFactory();
        try {
            Cache c = cf.getCache(null);
            assertTrue(c instanceof CoherenceCache);
        } catch (CacheAcquireException ex) {
            fail("Failed to get instance of CoherenceCache from factroy");
        }
    }
View Full Code Here


    }

    public TestEHCacheFactory(final String name) { super(name); }

    public void testConstructor() {
        CacheFactory cf = new EHCacheFactory();
        assertTrue(cf instanceof EHCacheFactory);
    }
View Full Code Here

        CacheFactory cf = new EHCacheFactory();
        assertTrue(cf instanceof EHCacheFactory);
    }

    public void testGetCacheType() {
        CacheFactory cf = new EHCacheFactory();
        assertEquals("ehcache", cf.getCacheType());
    }
View Full Code Here

        CacheFactory cf = new EHCacheFactory();
        assertEquals("ehcache", cf.getCacheType());
    }

    public void testGetCacheClassName() {
        CacheFactory cf = new EHCacheFactory();
        String classname = "org.castor.cache.distributed.EHCache";
        assertEquals(classname, cf.getCacheClassName());
    }
View Full Code Here

        String classname = "org.castor.cache.distributed.EHCache";
        assertEquals(classname, cf.getCacheClassName());
    }

    public void testGetCache() {
        CacheFactory cf = new EHCacheFactory();
        try {
            Cache c = cf.getCache(null);
            assertTrue(c instanceof EHCache);
        } catch (CacheAcquireException ex) {
            fail("Failed to get instance of EHCache from factroy");
        }
    }
View Full Code Here

            fail("Failed to get instance of EHCache from factroy");
        }
    }

    public void testShutdown() {
        CacheFactory cf = new EHCacheFactory();
        int counter = DistributedCacheFactoryMock.getCounter();
       
        DistributedCacheFactoryMock.setException(null);
        cf.shutdown();
        assertEquals(counter, DistributedCacheFactoryMock.getCounter());
    }
View Full Code Here

    }

    public TestUnlimitedFactory(final String name) { super(name); }

    public void testConstructor() {
        CacheFactory cf = new UnlimitedFactory();
        assertTrue(cf instanceof UnlimitedFactory);
    }
View Full Code Here

        CacheFactory cf = new UnlimitedFactory();
        assertTrue(cf instanceof UnlimitedFactory);
    }

    public void testGetCacheType() {
        CacheFactory cf = new UnlimitedFactory();
        assertEquals("unlimited", cf.getCacheType());
    }
View Full Code Here

        CacheFactory cf = new UnlimitedFactory();
        assertEquals("unlimited", cf.getCacheType());
    }

    public void testGetCacheClassName() {
        CacheFactory cf = new UnlimitedFactory();
        String classname = "org.castor.cache.simple.Unlimited";
        assertEquals(classname, cf.getCacheClassName());
    }
View Full Code Here

        String classname = "org.castor.cache.simple.Unlimited";
        assertEquals(classname, cf.getCacheClassName());
    }

    public void testGetCache() {
        CacheFactory cf = new UnlimitedFactory();
        try {
            Cache c = cf.getCache(null);
            assertTrue(c instanceof Unlimited);
        } catch (CacheAcquireException ex) {
            fail("Failed to get instance of Unlimited from factroy");
        }
    }
View Full Code Here

TOP

Related Classes of org.castor.cache.CacheFactory

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.