KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > cache > test > BaseCacheTest


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

5 package org.exoplatform.services.cache.test;
6
7 import org.exoplatform.services.cache.CacheService;
8 import org.exoplatform.services.cache.ExoCache;
9 import org.exoplatform.test.BasicTestCase;
10 /*
11  * Thu, May 15, 2003 @
12  * @author: Tuan Nguyen
13  * @version: $Id: BaseCacheTest.java,v 1.3 2004/04/10 17:21:36 tuan08 Exp $
14  * @since: 0.0
15  * @email: tuan08@yahoo.com
16  */

17 public class BaseCacheTest extends BasicTestCase {
18   
19   CacheService service_ ;
20
21   public BaseCacheTest(String JavaDoc name) {
22     super(name);
23   }
24
25   public void testCacheService() throws Exception JavaDoc {
26     ExoCache cache = service_.getCacheInstance("exo") ;
27     cache.put("test", "this is a test") ;
28     String JavaDoc ret = (String JavaDoc) cache.get("test");
29     assertTrue("Return value from cache is not null", ret != null) ;
30
31   }
32   
33   protected String JavaDoc getDescription() {
34     return "Test Cache Service" ;
35   }
36 }
37
Popular Tags