Package org.castor.cache

Examples of org.castor.cache.CacheFactory


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

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


    }

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

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

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

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

        CacheFactory cf = new JcsCacheFactory();
        assertEquals("jcs", cf.getCacheType());
    }

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

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

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

    }

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

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

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

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

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

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

        CacheFactory cf = new TimeLimitedFactory();
        assertEquals("time-limited", cf.getCacheType());
    }

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

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

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