1 /*
2  *  CVS: $Id: ObjectCacheTest.java,v 1.4 2004/07/16 16:22:33 marcus Exp $
3  * 
4  *  This file is part of zuul.
5  *
6  *  zuul is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 2 of the License, or
9  *  (at your option) any later version.
10 *
11 *  zuul is distributed in the hope that it will be useful,
12 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 *  GNU General Public License for more details.
15 *
16 *  You should have received a copy of the GNU General Public License
17 *  along with zuul; if not, write to the Free Software
18 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19 * 
20 *  Copyrigth 2004 by marcus, leh
21 * 
22 */
23package org.jzuul.engine.test;
24
25import org.jzuul.engine.ObjectCache;
26
27import junit.framework.TestCase;
28
29
30/**
31 * 
32 * Created on Jun 2, 2004
33 * 
34 * 
35 * @version $Revision: 1.4 $
36 */
37public class ObjectCacheTest extends TestCase {
38    ObjectCache small,big;
39    
40    /*
41     * @see TestCase#setUp()
42     */
43    protected void setUp() throws Exception {
44        super.setUp();
45        small = new ObjectCache(2);
46        big = new ObjectCache(1000);
47    }
48
49    /*
50     * @see TestCase#tearDown()
51     */
52    protected void tearDown() throws Exception {
53        super.tearDown();
54        small = null;
55        big = null;
56    }
57
58    public void testPut() {
59        small.put("fist","first");
60        small.put("second","second");
61        small.put("third","third");
62        
63        assertFalse(small.containsKey("first"));
64        assertTrue(small.containsKey("second"));
65        assertTrue(small.containsKey("third"));
66        
67    }
68
69}
70