TestCacheTest.java 1.1 KB
Newer Older
Kim Gyeongeun committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
package jp.agentec.sinaburocast.cache;

import javax.annotation.Resource;

import jp.agentec.sinaburocast.entity.Test;
import junit.framework.TestSuite;

import org.seasar.dao.unit.S2DaoTestCase;

public class TestCacheTest extends S2DaoTestCase {

	@Resource
	private TestCache testCache;

	public TestCacheTest(String string) {
		super(string);
	}

	public static TestSuite suite() {
		TestSuite suite = new TestSuite("TestCacheTest");
		suite.addTest(new TestCacheTest("testFindTest"));
		return suite;
	}

	/**
	 * @throws java.lang.Exception
	 */
	@Override
	public void setUp() throws Exception {
		super.setUp();
        include("app.dicon");
	}

	/**
	 * @throws java.lang.Exception
	 */
	@Override
	public void tearDown() throws Exception {
		super.tearDown();
	}

	public void testFindTest() {
		Test test = testCache.find(1);
		System.out.println(test);
		System.out.println(testCache.find(1));
		testCache.remove(1);
		System.out.println(testCache.find(1));
		System.out.println(testCache.find(1));
		testCache.removeAll();
		System.out.println(testCache.find(1));
		System.out.println(testCache.find(1));
	}

}