/* ==================================================================
* Created [2009-4-27 下午11:32:55] by Jon.King
* ==================================================================
* TSS
* ==================================================================
* mailTo:jinpujun@hotmail.com
* Copyright (c) Jon.King, 2009-2012
* ==================================================================
*/
package com.jinhe.tss.core.cachepool;
import junit.framework.TestCase;
import com.jinhe.tss.core.cachepool.strategy.CacheConstants;
import com.jinhe.tss.core.exception.BusinessException;
public class CachePoolManagerTest extends TestCase {
private CacheManager manager = null;
protected void setUp() throws Exception {
manager = CacheManager.getInstance(CacheConstants.STRATEGY_PATH);
}
protected void tearDown() throws Exception {
//System.exit(0);
}
public void testGetCachePool() {
assertNotNull(manager.getCachePool(CacheConstants.THREAD_POOL));
try{
manager.getCachePool("nothing");
}catch(Exception e){
assertSame(BusinessException.class, e.getClass());
System.out.println(e.getMessage());
}
}
public void testListCachePools() {
assertTrue(manager.listCachePools().size() >= 2);
}
}