Package org.castor.cache

Examples of org.castor.cache.Cache.keySet()


    }

    public void testKeySet() {
        Cache cache = initialize();

        Set set = cache.keySet();
       
        assertEquals(3, set.size());
        assertTrue(set.contains("first key"));
        assertTrue(set.contains("second key"));
        assertTrue(set.contains("third key"));
View Full Code Here


        assertEquals(0, cache.size());
       
        cache.clear();
        assertEquals(0, cache.size());
       
        Set keys = cache.keySet();
        assertEquals(0, keys.size());

        Collection values = cache.values();
        assertEquals(0, values.size());
View Full Code Here

    }

    public void testKeySet() throws CacheAcquireException {
        Cache cache = initialize();

        Set set = cache.keySet();
       
        assertEquals(3, set.size());
        assertTrue(set.contains("first key"));
        assertTrue(set.contains("second key"));
        assertTrue(set.contains("third key"));
View Full Code Here

    }

    public void testKeySet() throws CacheAcquireException {
        Cache cache = initialize();

        Set set = cache.keySet();
       
        assertEquals(3, set.size());
        assertTrue(set.contains("first key"));
        assertTrue(set.contains("second key"));
        assertTrue(set.contains("third key"));
View Full Code Here

    }

    public void testKeySet() {
        Cache cache = initialize();

        Set set = cache.keySet();
       
        assertEquals(3, set.size());
        assertTrue(set.contains("first key"));
        assertTrue(set.contains("second key"));
        assertTrue(set.contains("third key"));
View Full Code Here

        } catch (Throwable t) {
            fail("UnsupportedOperationException should have been thrown.");
        }
       
        try {
            c.keySet();
            fail("UnsupportedOperationException should have been thrown.");
        } catch (UnsupportedOperationException ex) {
            assertEquals("keySet()", ex.getMessage());
        } catch (Throwable t) {
            fail("UnsupportedOperationException should have been thrown.");
View Full Code Here

    }

    public void testKeySet() {
        Cache cache = initialize();

        Set set = cache.keySet();
       
        assertEquals(3, set.size());
        assertTrue(set.contains("first key"));
        assertTrue(set.contains("second key"));
        assertTrue(set.contains("third key"));
View Full Code Here

        } catch (UnsupportedOperationException ex) {
            assertEquals("containsValue(Object)", ex.getMessage());
        }
       
        try {
            c.keySet();
            fail("keySet() should throw an UnsupportedOperationException");
        } catch (UnsupportedOperationException ex) {
            assertEquals("keySet()", ex.getMessage());
        }
       
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.