Inheritance diagram for Protocols::BitTorrent::Trackers::Testing::SingleTrackerRequestSessionTest:
Definition at line 39 of file SingleTrackerRequestSessionTest.cpp.
Public Member Functions | |
| SingleTrackerRequestSessionTest () | |
| Default ctor. | |
| void | setUp () |
| void | tearDown () |
| void | testOpenClosedSession () |
| Closed session gets opened. | |
| void | stateSessionIsOpened () |
| void | testHttpRequestSessionGetsEstablished () |
| Session gets established after the HttpRequestSession gets established. | |
| void | stateSessionIsEstablished () |
| void | testSendRequest () |
| void | stateWaitingForResponse () |
| void | refHandleResponseHeaderSuccessfully (const ResponseHeader &responseHeader) |
| Handles response header in a successful way. | |
| void | scenarioRecieveResponse (const ResponseHeader &responseHeader, const QByteArray &responseBody, const TrackerResponse &trackerResponse) |
| Verifies response handling behavior if no errors occured. | |
| void | testRecieveResponseHttp200AndValidMessageBody () |
| A HTTP 200 OK response recieved, then a valid message body. | |
| void | testRecieveResponseHttp206AndValidMessageBody () |
| A HTTP 206 Partial Content response recieved, then a valid message body. | |
| void | scenarioHttpError (const ResponseHeader &responseHeader, const QString &httpErrorMessage) |
| Verifies response handling behavior if an HTTP error occured. | |
| void | testHttpErrorHttp100 () |
| A HTTP 100 Continue response recieved, which will result in HTTP error. | |
| void | testHttpErrorHttp101 () |
| A HTTP 101 Switching Protocols response recieved, which will result in HTTP error. | |
| void | testHttpErrorHttp300 () |
| A HTTP 300 Multiple Choices response recieved, which will result in HTTP error. | |
| void | testHttpErrorHttp307 () |
| A HTTP 307 Temporary Redirect response recieved, which will result in HTTP error. | |
| void | testHttpErrorHttp400 () |
| A HTTP 400 Bad Request response recieved, which will result in HTTP error. | |
| void | testHttpErrorHttp417 () |
| A HTTP 417 Expectation Failed response recieved, which will result in HTTP error. | |
| void | testHttpErrorHttp500 () |
| A HTTP 500 Internal Server Error response recieved, which will result in HTTP error. | |
| void | testHttpErrorHttp505 () |
| A HTTP 505 HTTP Version Not Supported response recieved, which will result in HTTP error. | |
| void | scenarioTrackerError (const ResponseHeader &responseHeader, const QByteArray &responseBody, const QString &trackerErrorMessage) |
| Verifies response handling behavior if a tracker error occured. | |
| void | testTrackerErrorHttp200AndInvalidResponseBody () |
| A HTTP request was ok, but the response body couldn't be parsed. | |
| void | testTrackerErrorHttp200AndFailureResponseBody () |
| A HTTP request was ok, but the tracker responded with an error. | |
| void | stateResponseHeaderHandledSuccessfully () |
| void | refCloseSessionAfterHttpRequestSessionIsClosed () |
| Closes the session itself (HttpRequestSession was closed successfully). | |
| void | refCloseEstablishedSession () |
| Closes an established session (not completely!). | |
| void | refCloseEstablishedSessionCompletely () |
| Completely closes an established session. | |
| void | refCloseClosedOrClosingSession () |
| Closes a closed or a closing session (nothing is actually done). | |
| void | stateSessionIsClosing () |
| void | testCloseClosedSession () |
| Closes a closed session. | |
| void | testCloseSessionCompletelyAfterItsEstablished () |
| Closes the session right after it's established. | |
| void | testCloseSessionCompletelyWhileWaitingForResponse () |
| Closes the session while waiting for response. | |
| void | testCloseSessionCompletelyAfterHandledResponseHeader () |
| Closes the session after the response from the tracker is handled. | |
| void | testCloseSessionWhileClosing () |
| Closes the session while it's alrady closing. | |
| void | refAbortEstablishedSession () |
| Aborts an established session. | |
| void | testAbortClosedSession () |
| Aborts a closed session. | |
| void | testAbortSessionAfterItsEstablished () |
| Aborts the session right after it's established. | |
| void | testAbortSessionWhileWaitingForResponse () |
| Aborts the session while waiting for response. | |
| void | testAbortSessionAfterHandledResponseHeader () |
| Aborts the session after the response from the tracker is handled. | |
| void | testAbortSessionWhileClosing () |
| Aborts the session while it's closing. | |
| void | refHandleHttpRequestSessionError (const QString &errorMessage) |
| Handles selected (errorMessage) HttpRequestSession error. | |
| void | testHttpRequestSessionErrorWhileEstablishingSession () |
| HttpRequestSession error appears while the session was establishing. | |
| void | testHttpRequestSessionErrorAfterSessionIsEstablished () |
| HttpRequestSession error appears after the session is established. | |
| void | testHttpRequestSessionErrorWhileWaitingForResponse () |
| HttpRequestSession error appears while waiting for response. | |
| void | testHttpRequestSessionErrorAfterHandledResponseHeader () |
| HttpRequestSession error appears after the response header was handled. | |
| void | testHttpRequestSessionErrorWhileClosing () |
| HttpRequestSession error appears while waiting for response. | |
Private Member Functions | |
| CPPUNIT_TEST_SUITE (SingleTrackerRequestSessionTest) | |
| CPPUNIT_TEST (testOpenClosedSession) | |
| CPPUNIT_TEST (testHttpRequestSessionGetsEstablished) | |
| CPPUNIT_TEST (testSendRequest) | |
| CPPUNIT_TEST (testRecieveResponseHttp200AndValidMessageBody) | |
| CPPUNIT_TEST (testRecieveResponseHttp206AndValidMessageBody) | |
| CPPUNIT_TEST (testHttpErrorHttp100) | |
| CPPUNIT_TEST (testHttpErrorHttp101) | |
| CPPUNIT_TEST (testHttpErrorHttp300) | |
| CPPUNIT_TEST (testHttpErrorHttp307) | |
| CPPUNIT_TEST (testHttpErrorHttp400) | |
| CPPUNIT_TEST (testHttpErrorHttp417) | |
| CPPUNIT_TEST (testHttpErrorHttp500) | |
| CPPUNIT_TEST (testHttpErrorHttp505) | |
| CPPUNIT_TEST (testTrackerErrorHttp200AndInvalidResponseBody) | |
| CPPUNIT_TEST (testTrackerErrorHttp200AndFailureResponseBody) | |
| CPPUNIT_TEST (testCloseClosedSession) | |
| CPPUNIT_TEST (testCloseSessionCompletelyAfterItsEstablished) | |
| CPPUNIT_TEST (testCloseSessionCompletelyWhileWaitingForResponse) | |
| CPPUNIT_TEST (testCloseSessionCompletelyAfterHandledResponseHeader) | |
| CPPUNIT_TEST (testCloseSessionWhileClosing) | |
| CPPUNIT_TEST (testAbortClosedSession) | |
| CPPUNIT_TEST (testAbortSessionAfterItsEstablished) | |
| CPPUNIT_TEST (testAbortSessionWhileWaitingForResponse) | |
| CPPUNIT_TEST (testAbortSessionAfterHandledResponseHeader) | |
| CPPUNIT_TEST (testAbortSessionWhileClosing) | |
| CPPUNIT_TEST (testHttpRequestSessionErrorWhileEstablishingSession) | |
| CPPUNIT_TEST (testHttpRequestSessionErrorAfterSessionIsEstablished) | |
| CPPUNIT_TEST (testHttpRequestSessionErrorWhileWaitingForResponse) | |
| CPPUNIT_TEST (testHttpRequestSessionErrorAfterHandledResponseHeader) | |
| CPPUNIT_TEST (testHttpRequestSessionErrorWhileClosing) | |
| CPPUNIT_TEST_SUITE_END () | |
| TrackerResponse | createValidTrackerResponse () const |
| Creates and returns valid tracker response. | |
Private Attributes | |
| auto_ptr< HttpRequestSessionMock > | httpRequestSession |
| auto_ptr< TrackerRequestSessionStatusMock > | sessionStatus |
| auto_ptr< SingleTrackerRequestSession > | sessionReal |
| auto_ptr< SingleTrackerRequestSessionDriver > | session |
| const Uri | ValidAnnounceUrl |
| const TrackerRequest | ValidTrackerRequest |
| const Uri | ValidTrackerRequestUrl |
| const QByteArray | ValidResponseBody |
| const QByteArray | InvalidResponseBody |
| const QByteArray | FailureResponseBody |
| const TrackerResponse | ValidTrackerResponse |
|
|
Default ctor.
Definition at line 539 of file SingleTrackerRequestSessionTest.cpp. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Creates and returns valid tracker response. I can't initialize a TrackerResponse without using a TrackerResponseParser, so I need to use this function. Definition at line 92 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Aborts an established session.
Definition at line 434 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Closes a closed or a closing session (nothing is actually done).
Definition at line 379 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Closes an established session (not completely!).
Definition at line 360 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Completely closes an established session.
Definition at line 372 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Closes the session itself (HttpRequestSession was closed successfully).
Definition at line 350 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Handles selected (errorMessage) HttpRequestSession error.
Definition at line 485 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Handles response header in a successful way.
Definition at line 185 of file SingleTrackerRequestSessionTest.cpp. |
|
||||||||||||
|
Verifies response handling behavior if an HTTP error occured.
Definition at line 233 of file SingleTrackerRequestSessionTest.cpp. |
|
||||||||||||||||
|
Verifies response handling behavior if no errors occured.
Definition at line 198 of file SingleTrackerRequestSessionTest.cpp. |
|
||||||||||||||||
|
Verifies response handling behavior if a tracker error occured.
Definition at line 308 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Definition at line 103 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Establish the state invariant for tests assuming a response header was handled successfully. Definition at line 341 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Establish the state invariant for tests assuming the session is closing. Definition at line 388 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Establishes the state invariant for tests assuming the session has been established. Definition at line 153 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Establishes the state invariant for tests assuming the session was opened. Definition at line 134 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Establishes the state invariant for tests assuming the session is waiting for the response from the HttpRequestSession. Definition at line 176 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Definition at line 113 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Aborts a closed session.
Definition at line 446 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Aborts the session after the response from the tracker is handled.
Definition at line 469 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Aborts the session right after it's established.
Definition at line 453 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Aborts the session while it's closing.
Definition at line 477 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Aborts the session while waiting for response.
Definition at line 461 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Closes a closed session.
Definition at line 396 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Closes the session after the response from the tracker is handled.
Definition at line 418 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Closes the session right after it's established.
Definition at line 402 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Closes the session while waiting for response.
Definition at line 410 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Closes the session while it's alrady closing.
Definition at line 426 of file SingleTrackerRequestSessionTest.cpp. |
|
|
A HTTP 100 Continue response recieved, which will result in HTTP error.
Definition at line 246 of file SingleTrackerRequestSessionTest.cpp. |
|
|
A HTTP 101 Switching Protocols response recieved, which will result in HTTP error.
Definition at line 253 of file SingleTrackerRequestSessionTest.cpp. |
|
|
A HTTP 300 Multiple Choices response recieved, which will result in HTTP error.
Definition at line 260 of file SingleTrackerRequestSessionTest.cpp. |
|
|
A HTTP 307 Temporary Redirect response recieved, which will result in HTTP error.
Definition at line 267 of file SingleTrackerRequestSessionTest.cpp. |
|
|
A HTTP 400 Bad Request response recieved, which will result in HTTP error.
Definition at line 274 of file SingleTrackerRequestSessionTest.cpp. |
|
|
A HTTP 417 Expectation Failed response recieved, which will result in HTTP error.
Definition at line 281 of file SingleTrackerRequestSessionTest.cpp. |
|
|
A HTTP 500 Internal Server Error response recieved, which will result in HTTP error.
Definition at line 288 of file SingleTrackerRequestSessionTest.cpp. |
|
|
A HTTP 505 HTTP Version Not Supported response recieved, which will result in HTTP error.
Definition at line 295 of file SingleTrackerRequestSessionTest.cpp. |
|
|
HttpRequestSession error appears after the response header was handled.
Definition at line 520 of file SingleTrackerRequestSessionTest.cpp. |
|
|
HttpRequestSession error appears after the session is established.
Definition at line 504 of file SingleTrackerRequestSessionTest.cpp. |
|
|
HttpRequestSession error appears while waiting for response.
Definition at line 528 of file SingleTrackerRequestSessionTest.cpp. |
|
|
HttpRequestSession error appears while the session was establishing.
Definition at line 496 of file SingleTrackerRequestSessionTest.cpp. |
|
|
HttpRequestSession error appears while waiting for response.
Definition at line 512 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Session gets established after the HttpRequestSession gets established.
Definition at line 140 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Closed session gets opened.
Definition at line 122 of file SingleTrackerRequestSessionTest.cpp. |
|
|
A HTTP 200 OK response recieved, then a valid message body.
Definition at line 214 of file SingleTrackerRequestSessionTest.cpp. |
|
|
A HTTP 206 Partial Content response recieved, then a valid message body.
Definition at line 221 of file SingleTrackerRequestSessionTest.cpp. |
|
|
A BitTorrent tracker request is mapped to a request URL and the request is sent. Definition at line 162 of file SingleTrackerRequestSessionTest.cpp. |
|
|
A HTTP request was ok, but the tracker responded with an error.
Definition at line 331 of file SingleTrackerRequestSessionTest.cpp. |
|
|
A HTTP request was ok, but the response body couldn't be parsed.
Definition at line 324 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Definition at line 84 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Definition at line 74 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Definition at line 83 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Definition at line 77 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Definition at line 76 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Definition at line 75 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Definition at line 79 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Definition at line 82 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Definition at line 80 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Definition at line 81 of file SingleTrackerRequestSessionTest.cpp. |
|
|
Definition at line 85 of file SingleTrackerRequestSessionTest.cpp. |