Package org.castor.cache

Examples of org.castor.cache.CacheFactory


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

    public void testShutdown() {
        CacheFactory cf = new UnlimitedFactory();
        cf.shutdown();
    }
View Full Code Here


    }

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

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

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

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

        CacheFactory cf = new FKCacheFactory();
        assertEquals("fkcache", cf.getCacheType());
    }

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

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

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

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

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

    }

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

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

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

    public void testGetCacheType() {
        CacheFactory cf = new CountLimitedFactory();
        assertEquals("count-limited", cf.getCacheType());
    }
View Full Code Here

        CacheFactory cf = new CountLimitedFactory();
        assertEquals("count-limited", cf.getCacheType());
    }

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

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

    public void testGetCache() {
        CacheFactory cf = new CountLimitedFactory();
        try {
            Cache c = cf.getCache(null);
            assertTrue(c instanceof CountLimited);
        } catch (CacheAcquireException ex) {
            fail("Failed to get instance of CountLimited 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.