Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

com::cosylab::logging::CacheTest Class Reference

List of all members.

Public Member Functions

 CacheTest (String str)
void testSize () throws Exception
void testGet () throws Exception
void testAddLog () throws Exception
void testReplace () throws Exception
void testClear () throws Exception
void testMemoryCache () throws Exception
void testTimeFrameCalc () throws Exception
void testLogExceedingTimeFrame () throws Exception
void testGetFirstLog () throws Exception
void testGetLastLog () throws Exception
void testGetLogs () throws Exception
void testKeySet () throws Exception

Protected Member Functions

void setUp () throws Exception
void tearDown ()

Private Member Functions

long fillCache () throws Exception

Private Attributes

LogCache cache
long logsGenerated

Detailed Description

The class to test the LogFileCache and the LogCache

Author:
acaproni
See also:
junit.framework.TestCase


Constructor & Destructor Documentation

com::cosylab::logging::CacheTest::CacheTest String  str  )  [inline]
 


Member Function Documentation

long com::cosylab::logging::CacheTest::fillCache  )  throws Exception [inline, private]
 

Fill the cache with dynamically generated logs The number of logs inserted in the list is greater than the memory cache size to stress the disk cache also.

Returns:
The number of logs inserted in the cache
Exceptions:
Exception 

void com::cosylab::logging::CacheTest::setUp  )  throws Exception [inline, protected]
 

This execute for each test and we want to have a cache with some logs

See also:
junit.framework.TestCase

void com::cosylab::logging::CacheTest::tearDown  )  [inline, protected]
 

See also:
junit.framework.TestCase

void com::cosylab::logging::CacheTest::testAddLog  )  throws Exception [inline]
 

Check the add method by inserting and reading a log

void com::cosylab::logging::CacheTest::testClear  )  throws Exception [inline]
 

test if a cleared cache contains exactly 0 logs

Exceptions:
Exception 

void com::cosylab::logging::CacheTest::testGet  )  throws Exception [inline]
 

Get all the logs in cache to check the get method

Exceptions:
Exception 

void com::cosylab::logging::CacheTest::testGetFirstLog  )  throws Exception [inline]
 

void com::cosylab::logging::CacheTest::testGetLastLog  )  throws Exception [inline]
 

void com::cosylab::logging::CacheTest::testGetLogs  )  throws Exception [inline]
 

void com::cosylab::logging::CacheTest::testKeySet  )  throws Exception [inline]
 

Test the keys returned by keyset

Exceptions:
Exception 

void com::cosylab::logging::CacheTest::testLogExceedingTimeFrame  )  throws Exception [inline]
 

Check if the method returning the logs exceeding the time frame is working as expected.

Exceptions:
Exception 

void com::cosylab::logging::CacheTest::testMemoryCache  )  throws Exception [inline]
 

It is deifficult to test LogCache... This is better then nothing

The test is done by reading all the cache sequentially. The first, middle and last logs acquired in the beginning are compared with those retrieved with the sequential scan.

void com::cosylab::logging::CacheTest::testReplace  )  throws Exception [inline]
 

Test the replacement of a log

void com::cosylab::logging::CacheTest::testSize  )  throws Exception [inline]
 

It checks if all the logs in the file are in the cache

Exceptions:
Exception 

void com::cosylab::logging::CacheTest::testTimeFrameCalc  )  throws Exception [inline]
 

Check the calculation of the time frame

Exceptions:
Exception 


Member Data Documentation

LogCache com::cosylab::logging::CacheTest::cache [private]
 

long com::cosylab::logging::CacheTest::logsGenerated [private]
 


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 03:13:02 2009 for ACS Java API by doxygen 1.3.8