org.melati.poem.util.test
Class CacheTest

Package class diagram package CacheTest
java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.melati.poem.util.test.CacheTest
All Implemented Interfaces:
junit.framework.Test

public class CacheTest
extends junit.framework.TestCase

Since:
30 May 2007
Author:
timp

Constructor Summary
CacheTest(String name)
           
 
Method Summary
protected  void setUp()
          
protected  void tearDown()
          
 void testCache()
          Test method for Cache.Cache(int).
 void testDelete()
          Test method for Cache.delete(java.lang.Object).
 void testDumpAnalysis()
          Test method for Cache.dumpAnalysis().
 void testFillingToBeyondCapacity()
           
 void testGCHandling()
           
 void testGet()
          Test method for Cache.get(java.lang.Object).
 void testGetInfo()
          Test method for Cache.getInfo().
 void testGetReport()
          Test method for Cache.getReport().
 void testIterate()
          Test method for Cache.iterate(org.melati.poem.util.Procedure).
 void testPut()
          Test method for Cache.put(java.lang.Object, java.lang.Object).
 void testPutNullKey()
           
 void testPutNullValue()
           
 void testSetSize()
          Test method for Cache.setSize(int).
 void testTrim()
          Test method for Cache.trim(int).
 void testZeroSizedCache()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CacheTest

public CacheTest(String name)
Parameters:
name -
Method Detail

setUp

protected void setUp()
              throws Exception

Overrides:
setUp in class junit.framework.TestCase
Throws:
Exception
See Also:
TestCase.setUp()

tearDown

protected void tearDown()
                 throws Exception

Overrides:
tearDown in class junit.framework.TestCase
Throws:
Exception
See Also:
TestCase.tearDown()

testCache

public void testCache()
Test method for Cache.Cache(int).


testSetSize

public void testSetSize()
Test method for Cache.setSize(int).


testTrim

public void testTrim()
Test method for Cache.trim(int).


testDelete

public void testDelete()
Test method for Cache.delete(java.lang.Object).


testPut

public void testPut()
Test method for Cache.put(java.lang.Object, java.lang.Object).


testPutNullKey

public void testPutNullKey()

testPutNullValue

public void testPutNullValue()

testGet

public void testGet()
Test method for Cache.get(java.lang.Object). It appears that when the cache size is exceeded (size is one bigger than size!!) then all elements are dropped.


testIterate

public void testIterate()
Test method for Cache.iterate(org.melati.poem.util.Procedure).


testGetReport

public void testGetReport()
Test method for Cache.getReport().


testGetInfo

public void testGetInfo()
Test method for Cache.getInfo().


testDumpAnalysis

public void testDumpAnalysis()
Test method for Cache.dumpAnalysis().


testFillingToBeyondCapacity

public void testFillingToBeyondCapacity()

testZeroSizedCache

public void testZeroSizedCache()

testGCHandling

public void testGCHandling()


Copyright © 2000-2010 PanEris. All Rights Reserved.