Package org.apache.archiva.redback.components.cache.test.examples.wine

Examples of org.apache.archiva.redback.components.cache.test.examples.wine.Wine


    @Test
    public void testAlwaysRefresh()
        throws Exception
    {
        Wine wine = new Wine( "bordeaux", "west/south of France" );
        String key = wine.getName();
        Cache<String,Wine> cache = this.getAlwaysRefresCache();
        cache.put( key, wine );
        Thread.sleep( 1001 );
        assertNull( cache.get( key ) );
    }
View Full Code Here


    @Test
    public void testNeverRefresh()
        throws Exception
    {
        Cache<String,Wine> cache = this.getNeverRefresCache();
        Wine wine = new Wine( "bordeaux", "west/south of France" );
        String key = wine.getName();
        cache.put( key, wine );
        //Thread.sleep( 1200 );
        Wine o = cache.get( key );
        assertNotNull( o );
        assertEquals( wine.hashCode(), o.hashCode() );
    }
View Full Code Here

    @Test
    public void testOneSecondRefresh()
        throws Exception
    {
        Cache<String,Wine> cache = this.getOneSecondRefresCache();
        Wine wine = new Wine( "bordeaux", "west/south of France" );
        String key = wine.getName();
        cache.put( key, wine );
        Thread.sleep( 1200 );
        assertNull( cache.get( key ) );
    }
View Full Code Here

    @Test
    public void testTwoSecondRefresh()
        throws Exception
    {
        Cache<String,Wine> cache = this.getTwoSecondRefresCache();
        Wine wine = new Wine( "bordeaux", "west/south of France" );
        String key = wine.getName();
        cache.put( key, wine );
        Thread.sleep( 500 );
        Wine o = cache.get( key );
        assertNotNull( o );
        assertEquals( wine.hashCode(), o.hashCode() );
    }
View Full Code Here

TOP

Related Classes of org.apache.archiva.redback.components.cache.test.examples.wine.Wine

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.