public class ExceptionHandlerTest extends Object
ExceptionHandler works as expected.| Constructor and Description |
|---|
ExceptionHandlerTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
shouldInformAdminOfNormalyTerminatedConnections()
When the connection was terminated normally, the admin should be informed.
|
void |
shouldWarnAdminOfUnexpectetlyClosedConnections()
When the connection was terminated abnormally, the admin should be warned.
|
void |
whenAMessageReadExceptionOccurredTheConnectionShouldBeClosedAndTheAdminBeWarned()
When a
MessageReadException occurred the connection should be closed and the admin should be warned. |
void |
whenAnUnknownCommunicationExceptionShouldBeHandledTheDeveloperShouldBeWarned()
When the
ExceptionHandler should handle an unknown CommunicationException the developer should be
notified of this error, the admin should be warned and the connection should be closed. |
void |
whenAProtocolExceptionOccurredTheConnectionShouldBeClosedAndTheAdminBeWarned()
When a
ProtocolException occurred the connection should be closed and the admin should be warned. |
void |
whenARuntimeExceptionOccurredTheConnectionShouldBeClosedAndTheDeveloperBeWarned()
When any
RuntimeException occurs, the connection should be closed, the developer should be notified on
this error and the admin should be warned. |
void |
whenClosingTheConnectionFailedTheAdminShouldBeWarned()
When closing the connection failed the admin should be warned.
|
public void shouldInformAdminOfNormalyTerminatedConnections()
public void shouldWarnAdminOfUnexpectetlyClosedConnections()
public void whenAProtocolExceptionOccurredTheConnectionShouldBeClosedAndTheAdminBeWarned()
throws Exception
ProtocolException occurred the connection should be closed and the admin should be warned.Exception - Not expected to leave the method.public void whenAMessageReadExceptionOccurredTheConnectionShouldBeClosedAndTheAdminBeWarned()
throws Exception
MessageReadException occurred the connection should be closed and the admin should be warned.Exception - Not expected to leave the method.public void whenARuntimeExceptionOccurredTheConnectionShouldBeClosedAndTheDeveloperBeWarned()
throws Exception
RuntimeException occurs, the connection should be closed, the developer should be notified on
this error and the admin should be warned.Exception - Not expected to leave the method.public void whenClosingTheConnectionFailedTheAdminShouldBeWarned()
throws Exception
Exception - Not expected to leave the method.public void whenAnUnknownCommunicationExceptionShouldBeHandledTheDeveloperShouldBeWarned()
throws Exception
ExceptionHandler should handle an unknown CommunicationException the developer should be
notified of this error, the admin should be warned and the connection should be closed.Exception - Not expected to leave the method.Copyright © 2016. All rights reserved.