Inheritance diagram for Protocols::BitTorrent::Trackers::Testing::TrackerResponseParserTest:
Definition at line 38 of file TrackerResponseParserTest.cpp.
Public Member Functions | |
| void | testLoadInvalidResponseEmptyData () |
| void | testLoadInvalidResponseRandomData () |
| void | testLoadInvalidResponseListInsteadOfDictionary () |
| void | testLoadInvalidResponseEmptyDictionary () |
| void | testLoadInvalidResponseWouldNotChangeInputResponseObject () |
| void | testLoadFieldFailureReasonPresentAndOtherDataAsWell () |
| void | testLoadFieldFailureReasonPresentAndNoOtherData () |
| void | testLoadFieldWarningMessageValid () |
| void | testLoadFieldIntervalMissing () |
| void | testLoadFieldIntervalNegative () |
| void | testLoadFieldIntervalZero () |
| void | testLoadFieldIntervalTooBig () |
| void | testLoadFieldIntervalValid () |
| void | testLoadFieldMinIntervalNegative () |
| void | testLoadFieldMinIntervalZero () |
| void | testLoadFieldMinIntervalTooBig () |
| void | testLoadFieldMinIntervalValid () |
| void | testLoadFieldTrackerIdValid () |
| void | testLoadFieldCompleteNegative () |
| void | testLoadFieldCompleteZero () |
| void | testLoadFieldCompleteTooBig () |
| void | testLoadFieldCompleteValid () |
| void | testLoadFieldIncompleteNegative () |
| void | testLoadFieldIncompleteZero () |
| void | testLoadFieldIncompleteTooBig () |
| void | testLoadFieldIncompleteValid () |
| void | testLoadFieldPeersMissing () |
| void | testLoadFieldPeersIntInsteadOfDictionary () |
| void | testLoadFieldPeersDictionaryModelEmptyList () |
| void | testLoadFieldPeersDictionaryModelOnePeerInfoPeerIdMissing () |
| void | testLoadFieldPeersDictionaryModelOnePeerInfoPeerIdInvalid () |
| void | testLoadFieldPeersDictionaryModelOnePeerInfoIpMissing () |
| void | testLoadFieldPeersDictionaryModelOnePeerInfoPortMissing () |
| void | testLoadFieldPeersDictionaryModelOnePeerInfoPortNegative () |
| void | testLoadFieldPeersDictionaryModelOnePeerInfoPortZero () |
| void | testLoadFieldPeersDictionaryModelOnePeerInfoPortTooBig () |
| void | testLoadFieldPeersDictionaryModelOnePeerInfoPortValid () |
| void | testLoadFieldPeersDictionaryModelTwoPeerInfoEverythingValid () |
| void | testLoadFieldPeersDictionaryModelTwoPeerInfoSecondInvalid () |
| void | testLoadFieldPeersBinaryModelOnePeerInfoStringTooShort () |
| void | testLoadFieldPeersBinaryModelOnePeerInfoStringTooLong () |
| void | testLoadFieldPeersBinaryModelOnePeerInfoEverythingValid () |
| void | testLoadFieldPeersBinaryModelTwoPeerInfoEverythingValid () |
| void | testLoadValidResponseMinimal () |
| void | testLoadValidResponseComplex () |
Private Member Functions | |
| CPPUNIT_TEST_SUITE (TrackerResponseParserTest) | |
| CPPUNIT_TEST (testLoadInvalidResponseEmptyData) | |
| CPPUNIT_TEST (testLoadInvalidResponseRandomData) | |
| CPPUNIT_TEST (testLoadInvalidResponseListInsteadOfDictionary) | |
| CPPUNIT_TEST (testLoadInvalidResponseEmptyDictionary) | |
| CPPUNIT_TEST (testLoadInvalidResponseWouldNotChangeInputResponseObject) | |
| CPPUNIT_TEST (testLoadFieldFailureReasonPresentAndOtherDataAsWell) | |
| CPPUNIT_TEST (testLoadFieldFailureReasonPresentAndNoOtherData) | |
| CPPUNIT_TEST (testLoadFieldWarningMessageValid) | |
| CPPUNIT_TEST (testLoadFieldIntervalNegative) | |
| CPPUNIT_TEST (testLoadFieldIntervalZero) | |
| CPPUNIT_TEST (testLoadFieldIntervalTooBig) | |
| CPPUNIT_TEST (testLoadFieldIntervalValid) | |
| CPPUNIT_TEST (testLoadFieldIntervalMissing) | |
| CPPUNIT_TEST (testLoadFieldMinIntervalNegative) | |
| CPPUNIT_TEST (testLoadFieldMinIntervalZero) | |
| CPPUNIT_TEST (testLoadFieldMinIntervalTooBig) | |
| CPPUNIT_TEST (testLoadFieldMinIntervalValid) | |
| CPPUNIT_TEST (testLoadFieldTrackerIdValid) | |
| CPPUNIT_TEST (testLoadFieldCompleteNegative) | |
| CPPUNIT_TEST (testLoadFieldCompleteZero) | |
| CPPUNIT_TEST (testLoadFieldCompleteTooBig) | |
| CPPUNIT_TEST (testLoadFieldCompleteValid) | |
| CPPUNIT_TEST (testLoadFieldIncompleteNegative) | |
| CPPUNIT_TEST (testLoadFieldIncompleteZero) | |
| CPPUNIT_TEST (testLoadFieldIncompleteTooBig) | |
| CPPUNIT_TEST (testLoadFieldIncompleteValid) | |
| CPPUNIT_TEST (testLoadFieldPeersMissing) | |
| CPPUNIT_TEST (testLoadFieldPeersIntInsteadOfDictionary) | |
| CPPUNIT_TEST (testLoadFieldPeersDictionaryModelEmptyList) | |
| CPPUNIT_TEST (testLoadFieldPeersDictionaryModelOnePeerInfoPeerIdMissing) | |
| CPPUNIT_TEST (testLoadFieldPeersDictionaryModelOnePeerInfoPeerIdInvalid) | |
| CPPUNIT_TEST (testLoadFieldPeersDictionaryModelOnePeerInfoIpMissing) | |
| CPPUNIT_TEST (testLoadFieldPeersDictionaryModelOnePeerInfoPortMissing) | |
| CPPUNIT_TEST (testLoadFieldPeersDictionaryModelOnePeerInfoPortNegative) | |
| CPPUNIT_TEST (testLoadFieldPeersDictionaryModelOnePeerInfoPortZero) | |
| CPPUNIT_TEST (testLoadFieldPeersDictionaryModelOnePeerInfoPortTooBig) | |
| CPPUNIT_TEST (testLoadFieldPeersDictionaryModelOnePeerInfoPortValid) | |
| CPPUNIT_TEST (testLoadFieldPeersDictionaryModelTwoPeerInfoEverythingValid) | |
| CPPUNIT_TEST (testLoadFieldPeersDictionaryModelTwoPeerInfoSecondInvalid) | |
| CPPUNIT_TEST (testLoadFieldPeersBinaryModelOnePeerInfoStringTooShort) | |
| CPPUNIT_TEST (testLoadFieldPeersBinaryModelOnePeerInfoStringTooLong) | |
| CPPUNIT_TEST (testLoadFieldPeersBinaryModelOnePeerInfoEverythingValid) | |
| CPPUNIT_TEST (testLoadFieldPeersBinaryModelTwoPeerInfoEverythingValid) | |
| CPPUNIT_TEST (testLoadValidResponseMinimal) | |
| CPPUNIT_TEST (testLoadValidResponseComplex) | |
| CPPUNIT_TEST_SUITE_END () | |
Static Private Member Functions | |
| template<class T> | |
| static QByteArray | stringifyNum (T num) |
| Returns num transformed into string. | |
| static QByteArray | createPeersBinaryModel (const QByteArray &ipAddress, quint16 port) |
| Returns a string representing one peer as a binary model. | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
Returns a string representing one peer as a binary model. Returned string will have the following format (without white-spaces): ipAddress port 6B 2B Everything will be in a binary format. Definition at line 104 of file TrackerResponseParserTest.cpp. |
|
||||||||||
|
Returns num transformed into string.
Definition at line 90 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with negative 'complete' value would be parsed (it's only optional), but this field value won't be saved. Definition at line 437 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with too big 'complete' value would be parsed (it's only optional), but this field value won't be saved. Definition at line 475 of file TrackerResponseParserTest.cpp. |
|
|
Verifies 'complete' field parsing corectness. Definition at line 493 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with zero 'complete' value will be parsed correctly. Definition at line 456 of file TrackerResponseParserTest.cpp. |
|
|
Verifies situation when only 'failure reason' field is present and no other data. Definition at line 214 of file TrackerResponseParserTest.cpp. |
|
|
Verifies situation when 'failure reason' field is present, but there are also other data, so it won't be parsed correctly. Definition at line 196 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with negative 'incomplete' value will be parsed (it's only optional), but this field value won't be saved. Definition at line 512 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with too big 'incomplete' value will be parsed (it's only optional), but this field value won't be saved. Definition at line 551 of file TrackerResponseParserTest.cpp. |
|
|
Verifies 'incomplete' field parsing corectness. Definition at line 569 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with zero 'incomplete' value will be parsed correctly. Definition at line 531 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data without 'interval' field won't be parsed correctly. Definition at line 257 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with negative 'interval' value won't be parsed correctly. Definition at line 273 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with too big 'interval' value won't be parsed correctly. Definition at line 308 of file TrackerResponseParserTest.cpp. |
|
|
Verifies 'interval' field parsing corectness. Definition at line 324 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with zero 'interval' value will be parsed correctly. Definition at line 290 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with negative 'min interval' value would be parsed (it's only optional), but this field value won't be saved. Definition at line 342 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with too big 'min interval' value would be parsed (it's only optional), but this field value won't be saved. Definition at line 380 of file TrackerResponseParserTest.cpp. |
|
|
Verifies 'interval' field parsing corectness. Definition at line 398 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with zero 'min interval' value will be parsed correctly. Definition at line 361 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with 'peers' containing one valid record with valid port will be parsed correctly. Definition at line 965 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with 'peers' containing too long string won't be parsed correctly. Definition at line 945 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with 'peers' containing too short string won't be parsed correctly. Definition at line 925 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with 'peers' containing two valid records with all needed info valid will be parsed parsed correctly. Definition at line 989 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with empty 'peers' will be parsed correctly. Definition at line 621 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with 'peers' containing one record with missing 'ip' will be parsed correctly, but that peer info won't be saved. Definition at line 694 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with 'peers' containing one record with invalid 'peer id' will be parsed correctly, but peerID of that peer will be set to default value. Definition at line 665 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with 'peers' containing one record with missing 'peer id' will be parsed correctly, but that peer info won't be saved. Definition at line 640 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with 'peers' containing one record with missing 'port' will be parsed correctly, but that peer info won't be saved. Definition at line 719 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with 'peers' containing one valid record with negative 'port' will be parsed correctly, but the port will have it's default value. Definition at line 744 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with 'peers' containing one valid record with too big 'port' will be parsed correctly, but the port will have it's default value. Definition at line 802 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with 'peers' containing one valid record with valid port will be parsed correctly. Definition at line 830 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with 'peers' containing one valid record with zero 'port' will be parsed correctly. Definition at line 773 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with 'peers' containing two valid records with all needed info valid will be parsed parsed correctly. Definition at line 858 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with 'peers' containing one valid and one invalid records will be parsed parsed correctly, but there will be only one peer info in the result response. Definition at line 894 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with 'peers' containing list of ints instead of list of dictionaries won't be parsed correctly. Definition at line 604 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data without 'peers' field won't be parsed correctly. Definition at line 588 of file TrackerResponseParserTest.cpp. |
|
|
Verifies 'tracker ID' field parsing corectness. Definition at line 416 of file TrackerResponseParserTest.cpp. |
|
|
Verifies 'warning message' field parsing corectness. Definition at line 238 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that empty raw response data won't be parsed. Definition at line 122 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data with empty dictionary won't be parsed. Definition at line 161 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that invalid (list instead of a dictionary) raw response data won't be parsed. Definition at line 148 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that invalid (random data) raw response data won't be parsed. Definition at line 135 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that invalid parsing won't change input response object. Definition at line 173 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data containing complex valid response would be parsed parsed correctly. Definition at line 1044 of file TrackerResponseParserTest.cpp. |
|
|
Verifies that raw response data containing minimal valid response would be parsed parsed correctly. Definition at line 1019 of file TrackerResponseParserTest.cpp. |