Protocols::BitTorrent::Packets::Testing::HaveAllTest Class Reference
Detailed Description
Tests for the packet class
HaveAll.
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:
- setField() should invalidate the payload. That is implicitly tested by scenarioReadSetWritePacket(). If the payload is not invalidated then the written packet should be incorrect. The case when only a single setter does not invalidate the header is not caught because we are always setting all fields; however, since we generate the setters from a XSL template either all or none of the setters will invalidate the payload.
Definition at line 51 of file HaveAllTest.cpp.
The documentation for this class was generated from the following file: