Inheritance diagram for Protocols::Gnutella::Packets::Testing::QueryHitsTest:


scenarioReadPacket() verifies that a packet's payload and header fields are a) correctly parsed from raw bytes, or b) could not be parsed.
scenarioWritePacket() verifies that a packet's payload and header fields are correctly written as raw bytes.
scenarioReadSetWritePacket() verifies that the fields of a correctly read packet could be modified and written as raw bytes.
Blackbox considerations:
Definition at line 51 of file QueryHitsTest.cpp.
Public Member Functions | |
| QueryHitsTest () | |
| void | setUp () |
| void | tearDown () |
| void | scenarioReadPacket (const QByteArray &rawHeader, const QByteArray &rawPayload, bool parsedOk, quint16 port, const QHostAddress &ipAddress, quint32 speed, const ResultSet &resultSet, const QueryHitsData &queryHitsData) |
| Tests parsing the packet fields from raw bytes. | |
| void | scenarioWritePacket (quint16 port, const QHostAddress &ipAddress, quint32 speed, const ResultSet &resultSet, const QueryHitsData &queryHitsData, const QByteArray &rawHeader, const QByteArray &rawPayload) |
| Tests writing the packet fields as raw bytes. | |
| void | scenarioReadSetWritePacket (const QByteArray &rawHeader, const QByteArray &rawPayload, quint16 port, const QHostAddress &ipAddress, quint32 speed, const ResultSet &resultSet, const QueryHitsData &queryHitsData, const QByteArray &rawHeader2, const QByteArray &rawPayload2) |
| Tests parsing a packet, modifying the fields then writing it again. | |
| void | testPacketProperties () |
| Tests constant packet properties. | |
| void | testReadPacketOK () |
| void | testReadPacketBAD () |
| void | testWritePacketOK () |
| void | testReadSetWritePacketOK () |
Private Member Functions | |
| CPPUNIT_TEST_SUITE (QueryHitsTest) | |
| CPPUNIT_TEST (testPacketProperties) | |
| CPPUNIT_TEST (testReadPacketOK) | |
| CPPUNIT_TEST (testReadPacketBAD) | |
| CPPUNIT_TEST (testWritePacketOK) | |
| CPPUNIT_TEST (testReadSetWritePacketOK) | |
| CPPUNIT_TEST_SUITE_END () | |
Private Attributes | |
| Result | simpleResult |
| QueryHitsData | simpleQueryHitsData |
| auto_ptr< QueryHits > | packet |
|
|
Definition at line 66 of file QueryHitsTest.cpp. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||||||||||||||||||||||
|
Tests parsing the packet fields from raw bytes. Parses raw bytes and then verifies that all payload fields have correct values. Definition at line 91 of file QueryHitsTest.cpp. |
|
||||||||||||||||||||||||||||||||||||||||
|
Tests parsing a packet, modifying the fields then writing it again. This scenario implicitly tests blackbox behavior! The main aim of this scenario is to verify that the payload fields are invalidated (blackbox behavior) after setting them and that the correct values are written afterwards. As single test case for this scenario will be enough. Definition at line 143 of file QueryHitsTest.cpp. |
|
||||||||||||||||||||||||||||||||
|
Tests writing the packet fields as raw bytes. Sets the fields of a default constructed object and verifies that they are correctly written as write bytes. Definition at line 116 of file QueryHitsTest.cpp. |
|
|
Definition at line 70 of file QueryHitsTest.cpp. |
|
|
Definition at line 81 of file QueryHitsTest.cpp. |
|
|
Tests constant packet properties.
Definition at line 167 of file QueryHitsTest.cpp. |
|
|
Definition at line 186 of file QueryHitsTest.cpp. |
|
|
Definition at line 173 of file QueryHitsTest.cpp. |
|
|
Definition at line 211 of file QueryHitsTest.cpp. |
|
|
Definition at line 199 of file QueryHitsTest.cpp. |
|
|
Definition at line 63 of file QueryHitsTest.cpp. |
|
|
Definition at line 62 of file QueryHitsTest.cpp. |
|
|
Definition at line 61 of file QueryHitsTest.cpp. |