Package org.castor.cache

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


    }

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

        Collection col = cache.values();
       
        assertEquals(3, col.size());
        assertTrue(col.contains("first value"));
        assertTrue(col.contains("second value"));
        assertTrue(col.contains("third value"));
View Full Code Here


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

        Collection values = cache.values();
        assertEquals(0, values.size());

        Set entries = cache.entrySet();
        assertEquals(0, entries.size());
    }
View Full Code Here

    }

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

        Collection col = cache.values();
       
        assertEquals(3, col.size());
        assertTrue(col.contains("first value"));
        assertTrue(col.contains("second value"));
        assertTrue(col.contains("third value"));
View Full Code Here

    }

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

        Collection col = cache.values();
       
        assertEquals(3, col.size());
        assertTrue(col.contains("first value"));
        assertTrue(col.contains("second value"));
        assertTrue(col.contains("third value"));
View Full Code Here

    }

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

        Collection col = cache.values();
       
        assertEquals(3, col.size());
        assertTrue(col.contains("first value"));
        assertTrue(col.contains("second value"));
        assertTrue(col.contains("third value"));
View Full Code Here

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

    }

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

        Collection col = cache.values();
       
        assertEquals(3, col.size());
        assertTrue(col.contains("first value"));
        assertTrue(col.contains("second value"));
        assertTrue(col.contains("third value"));
View Full Code Here

        } catch (UnsupportedOperationException ex) {
            assertEquals("keySet()", ex.getMessage());
        }
       
        try {
            c.values();
            fail("values() should throw an UnsupportedOperationException");
        } catch (UnsupportedOperationException ex) {
            assertEquals("values()", 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.