froehlich 02/01/20 06:30:20
Modified: simplestore/src/test/org/apache/commons/simplestore
TestSoftRefMemoryStore.java
Log:
added remove test case.
Revision Changes Path
1.2 +8 -1
jakarta-commons-sandbox/simplestore/src/test/org/apache/commons/simplestore/TestSoftRefMemoryStore.java
Index: TestSoftRefMemoryStore.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/simplestore/src/test/org/apache/commons/simplestore/TestSoftRefMemoryStore.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TestSoftRefMemoryStore.java 20 Jan 2002 14:25:41 -0000 1.1
+++ TestSoftRefMemoryStore.java 20 Jan 2002 14:30:20 -0000 1.2
@@ -17,7 +17,7 @@
/**
* @author Gerhard Froehlich <a href="mailto:[EMAIL PROTECTED]">
* [EMAIL PROTECTED]</a>
- * @version $Id: TestSoftRefMemoryStore.java,v 1.1 2002/01/20 14:25:41 froehlich
Exp $
+ * @version $Id: TestSoftRefMemoryStore.java,v 1.2 2002/01/20 14:30:20 froehlich
Exp $
*/
public class TestSoftRefMemoryStore extends TestMap
{
@@ -53,8 +53,15 @@
System.out.println("Testing MRUMemoryStore with WeakReferences");
map.put("first", "First Item");
map.put("second", "Second Item");
+
assertEquals("Top item is 'Second Item'", map.get("first"), "First Item");
assertEquals("Next Item is 'First Item'", map.get("second"), "Second Item");
+
+ map.remove("first");
+ map.remove("second");
+
+ assertTrue("Map is empty, now", map.isEmpty());
+ assertEquals("Map has size zero, now", map.size(), 0);
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>