Package org.castor.cache

Examples of org.castor.cache.CacheFactory


    }

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

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


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

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

        CacheFactory cf = new NoCacheFactory();
        assertEquals("none", cf.getCacheType());
    }

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

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

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

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

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

    }

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

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

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

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

        CacheFactory cf = new LRUHashbeltFactory();
        assertEquals("lru", cf.getCacheType());
    }

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

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

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

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

    public void testShutdown() {
        CacheFactory cf = new LRUHashbeltFactory();
        cf.shutdown();
    }
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.