

Public Member Functions | |
| AcsJExceptionTest () throws Exception | |
| void | testGetErrorTrace () |
| void | testErrorTraceToAcsJExConversion () |
| void | testJCompletion () |
| void | testLogAcsJException () |
Private Member Functions | |
| void | checkWrapperAcsJEx (AcsJACSErrTest0Ex ex) |
Private Attributes | |
| ClientServerExceptionExample | exSystem |
| String | hostName |
Tests for AcsJException, alma.acs.exceptions.AcsJCompletion and the generated example subclasses.
| alma::acs::exceptions::AcsJExceptionTest::AcsJExceptionTest | ( | ) | throws Exception [inline] |
| void alma::acs::exceptions::AcsJExceptionTest::checkWrapperAcsJEx | ( | AcsJACSErrTest0Ex | ex | ) | [inline, private] |
Checks the structure and values of the exception obtained from ClientServerExceptionExample#throwWrapperAcsJACSErrTest0Ex(boolean).
| ex |
References alma::acs::exceptions::AcsJException::getFile(), alma::acs::exceptions::AcsJException::getHost(), alma::acs::exceptions::AcsJException::getLine(), alma::acs::exceptions::AcsJException::getMethod(), alma::acs::exceptions::AcsJException::getSeverity(), alma::acs::exceptions::AcsJException::getThreadName(), alma::acs::exceptions::AcsJException::getTimestampMillis(), alma::acs::exceptions::AcsJException::getTraceDepth(), and hostName.
Referenced by testErrorTraceToAcsJExConversion().
| void alma::acs::exceptions::AcsJExceptionTest::testErrorTraceToAcsJExConversion | ( | ) | [inline] |
Tests the conversion from AcsJACSErrTest0Ex to ErrorTrace and back, first by wrapping and later by directly converting a CORBA exception with/to a native Java exception.
Calls ClientServerExceptionExample#throwWrapperAcsJACSErrTest0Ex and ClientServerExceptionExample#throwConvertedAcsJACSErrTest0Ex to get the three linked exceptions
AcsJACSErrTest0Ex thrown locally ("client side"), only in case of throwWrapperAcsJACSErrTest0Ex AcsJException caused by a NullPointerException, both thrown "remotely" in the implementation of the "server side" method ClientServerExceptionExample#throwACSErrTest0Ex and translated back and forth from an ErrorTrace Checks that the exceptions are correctly chained up and the data is correct.
References checkWrapperAcsJEx(), exSystem, alma::acs::exceptions::AcsJException::getProperty(), alma::acs::exceptions::AcsJException::getTraceDepth(), alma::acs::exceptions::ClientServerExceptionExample::throwConvertedAcsJACSErrTest0Ex(), and alma::acs::exceptions::ClientServerExceptionExample::throwWrapperAcsJACSErrTest0Ex().
| void alma::acs::exceptions::AcsJExceptionTest::testGetErrorTrace | ( | ) | [inline] |
Uses ClientServerExceptionExample#throwOriginalAcsJACSErrTest0Ex to verify the output of the method AcsJException#getErrorTrace. Thus what gets tested is the conversion from the AcsJ- to the CORBA world.
Fields which are more difficult to get out from an ErrorTrace object will be checked in subsequent tests.
References exSystem, alma::acs::exceptions::AcsJException::getErrorTrace(), alma::ACSErr::ErrorTrace::previousError, alma::acs::exceptions::ClientServerExceptionExample::throwOriginalAcsJACSErrTest0Ex(), and alma::ACSErr::ErrorTrace::timeStamp.
| void alma::acs::exceptions::AcsJExceptionTest::testJCompletion | ( | ) | [inline] |
Creates Completion objects from scratch, from other completion objects, with and without associated exception, and checks the values.
References alma::ACSErr::Completion::code, alma::acs::exceptions::AcsJCompletion::getAcsJException(), alma::acs::exceptions::AcsJCompletion::getCode(), alma::acs::exceptions::AcsJCompletion::getTimeStamp(), alma::acs::exceptions::AcsJCompletion::getType(), alma::acs::exceptions::AcsJCompletion::isError(), alma::ACSErr::ErrorTrace::previousError, alma::ACSErr::Completion::previousError, alma::ACSErr::ErrorTrace::timeStamp, alma::ACSErr::Completion::timeStamp, alma::acs::exceptions::AcsJCompletion::toCorbaCompletion(), and alma::ACSErr::Completion::type.
| void alma::acs::exceptions::AcsJExceptionTest::testLogAcsJException | ( | ) | [inline] |
Checks if logging of ACS exceptions (including caused-by exceptions) works. See also alma.demo.client.XmlComponentClient::testException() in module jcontexmpl.
References exSystem, alma::acs::testsupport::LogRecordCollectingLogger::getCollectedLogRecords(), hostName, alma::acs::testsupport::LogRecordCollectingLogger::log(), and alma::acs::exceptions::ClientServerExceptionExample::throwWrapperAcsJACSErrTest0Ex().
Referenced by AcsJExceptionTest(), testErrorTraceToAcsJExConversion(), testGetErrorTrace(), and testLogAcsJException().
String alma::acs::exceptions::AcsJExceptionTest::hostName [private] |
Referenced by AcsJExceptionTest(), checkWrapperAcsJEx(), and testLogAcsJException().
1.6.2