

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" |
| alma::acs::jlog::test::ErrorLogFileTest::ErrorLogFileTest | ( | ) | throws Exception [inline] |
Constructor
| Exception |
| 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.
| name | The name of the file | |
| numOfEntries | The number of entries in the file | |
| firstEntryNum | The number of the first entry in the file |
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.
Reimplemented from alma::acs::component::client::ComponentClientTestCase.
| void alma::acs::jlog::test::ErrorLogFileTest::testAppend | ( | ) | throws Exception [inline] |
Test the append method
References alma::acs::logging::dialogs::error::ErrorLogFile::append(), checkFile(), file, alma::acs::logging::dialogs::error::ErrorLogFile::getFileName(), and str.
| void alma::acs::jlog::test::ErrorLogFileTest::testAppendTimeout | ( | ) | throws Exception [inline] |
Test the append method with a timeout
References alma::acs::logging::dialogs::error::ErrorLogFile::append(), checkFile(), file, alma::acs::logging::dialogs::error::ErrorLogFile::getFileName(), str, and TIMEOUT.
| void alma::acs::jlog::test::ErrorLogFileTest::testClear | ( | ) | throws Exception [inline] |
Test the clear method of the ErrorLogFile
| Exception |
References alma::acs::logging::dialogs::error::ErrorLogFile::append(), checkFile(), alma::acs::logging::dialogs::error::ErrorLogFile::clear(), file, alma::acs::logging::dialogs::error::ErrorLogFile::getFileName(), and str.
| void alma::acs::jlog::test::ErrorLogFileTest::testCopy | ( | ) | throws Exception [inline] |
Test the copy method of the ErrorLogFile
| Exception |
References alma::acs::logging::dialogs::error::ErrorLogFile::append(), checkFile(), alma::acs::logging::dialogs::error::ErrorLogFile::copy(), file, and str.
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().
final int alma::acs::jlog::test::ErrorLogFileTest::TIMEOUT = 15 [private] |
The timeout
Referenced by setUp(), and testAppendTimeout().
1.6.2