alma::acs::jlog::test::ErrorLogFileTest Class Reference

Inheritance diagram for alma::acs::jlog::test::ErrorLogFileTest:
Inheritance graph
[legend]
Collaboration diagram for alma::acs::jlog::test::ErrorLogFileTest:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ErrorLogFileTest () throws Exception
void testAppend () throws Exception
void testAppendTimeout () throws Exception
void testCopy () throws Exception
void testClear () throws Exception

Protected Member Functions

void setUp () throws Exception

Private Member Functions

boolean checkFile (String name, int numOfEntries, int firstEntryNum) throws Exception

Private Attributes

ErrorLogFile file
final int TIMEOUT = 15
final String str = "BaseString"

Constructor & Destructor Documentation

alma::acs::jlog::test::ErrorLogFileTest::ErrorLogFileTest (  )  throws Exception [inline]

Constructor

Exceptions:
Exception 

Member Function Documentation

boolean alma::acs::jlog::test::ErrorLogFileTest::checkFile ( String  name,
int  numOfEntries,
int  firstEntryNum 
) throws Exception [inline, private]

Check the content of the file with the passed name. The correctness is ensured if the file exists, is readable and it is composed of passed number of entries.

Parameters:
name The name of the file
numOfEntries The number of entries in the file
firstEntryNum The number of the first entry in the file
Returns:
true If the content of the file is as expected

References str.

Referenced by testAppend(), testAppendTimeout(), testClear(), and testCopy().

void alma::acs::jlog::test::ErrorLogFileTest::setUp (  )  throws Exception [inline, protected]

Starts CORBA in the client process and connects to the manager and logger.

Subclasses that override this method must call super.setUp(), likely before any other code in that method.

See also:
junit.framework.TestCase::setUp()

Reimplemented from alma::acs::component::client::ComponentClientTestCase.

References file, and TIMEOUT.

void alma::acs::jlog::test::ErrorLogFileTest::testAppend (  )  throws Exception [inline]
void alma::acs::jlog::test::ErrorLogFileTest::testAppendTimeout (  )  throws Exception [inline]
void alma::acs::jlog::test::ErrorLogFileTest::testClear (  )  throws Exception [inline]
void alma::acs::jlog::test::ErrorLogFileTest::testCopy (  )  throws Exception [inline]

Test the copy method of the ErrorLogFile

Exceptions:
Exception 

References alma::acs::logging::dialogs::error::ErrorLogFile::append(), checkFile(), alma::acs::logging::dialogs::error::ErrorLogFile::copy(), file, and str.


Member Data Documentation

The object to test

Referenced by setUp(), testAppend(), testAppendTimeout(), testClear(), and testCopy().

final String alma::acs::jlog::test::ErrorLogFileTest::str = "BaseString" [private]

Each test writes this string plus an integer.

In this way it is possible to check the written file.

Referenced by checkFile(), testAppend(), testAppendTimeout(), testClear(), and testCopy().

The timeout

Referenced by setUp(), and testAppendTimeout().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2