Protocols::BitTorrent::Trackers::Testing::TrackerRequestUrlCreatorTest Class Reference

Inherits TestFixture.

Inheritance diagram for Protocols::BitTorrent::Trackers::Testing::TrackerRequestUrlCreatorTest:

Inheritance graph
[legend]
Collaboration diagram for Protocols::BitTorrent::Trackers::Testing::TrackerRequestUrlCreatorTest:

Collaboration graph
[legend]
List of all members.

Detailed Description

TrackerRequestUrlCreator class testing unit.

Definition at line 37 of file TrackerRequestUrlCreatorTest.cpp.

Public Member Functions

 TrackerRequestUrlCreatorTest ()
 Default ctor.
void testCreateRequestUrlMinimalRequest ()
 Verifies that a sample minimal request URL will be created successfuly.
void testCreateRequestUrlCompleteRequest ()
 Verifies that a sample complete request URL will be created successfuly.
void testCreateRequestUrlMinNumbers ()
 Verifies that minimal numbers are created correctly.
void testCreateRequestUrlMaxNumbers ()
 Verifies that maximal numbers are created correctly.

Private Member Functions

 CPPUNIT_TEST_SUITE (TrackerRequestUrlCreatorTest)
 CPPUNIT_TEST (testCreateRequestUrlMinimalRequest)
 CPPUNIT_TEST (testCreateRequestUrlCompleteRequest)
 CPPUNIT_TEST (testCreateRequestUrlMinNumbers)
 CPPUNIT_TEST (testCreateRequestUrlMaxNumbers)
 CPPUNIT_TEST_SUITE_END ()
void scenarioCreateRequestUrl (const TrackerRequest &request, const QByteArray &referenceUrl)
 Verifies that the request URL is correctly created.

Static Private Member Functions

template<class T>
static QByteArray stringifyNum (T num)
 Returns num transformed into string.

Private Attributes

const QByteArray ReferenceAnnounceUrl
const QByteArray ReferenceMinimalRequestUrlQueryPart
const QByteArray ReferenceMinimalRequestUrl
const QByteArray ReferenceCompleteRequestUrlQueryPart
const QByteArray ReferenceCompleteRequestUrl
const TrackerRequest MinimalRequest
const TrackerRequest CompleteRequest


Constructor & Destructor Documentation

Protocols::BitTorrent::Trackers::Testing::TrackerRequestUrlCreatorTest::TrackerRequestUrlCreatorTest  ) 
 

Default ctor.

This ctor is here to initialize complex objects constants because of possible static objects initialization order problems when declaring them as static constants.

Definition at line 169 of file TrackerRequestUrlCreatorTest.cpp.


Member Function Documentation

Protocols::BitTorrent::Trackers::Testing::TrackerRequestUrlCreatorTest::CPPUNIT_TEST testCreateRequestUrlMaxNumbers   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::TrackerRequestUrlCreatorTest::CPPUNIT_TEST testCreateRequestUrlMinNumbers   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::TrackerRequestUrlCreatorTest::CPPUNIT_TEST testCreateRequestUrlCompleteRequest   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::TrackerRequestUrlCreatorTest::CPPUNIT_TEST testCreateRequestUrlMinimalRequest   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::TrackerRequestUrlCreatorTest::CPPUNIT_TEST_SUITE TrackerRequestUrlCreatorTest   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::TrackerRequestUrlCreatorTest::CPPUNIT_TEST_SUITE_END  )  [private]
 

void Protocols::BitTorrent::Trackers::Testing::TrackerRequestUrlCreatorTest::scenarioCreateRequestUrl const TrackerRequest request,
const QByteArray &  referenceUrl
[inline, private]
 

Verifies that the request URL is correctly created.

Creates a request URL from the selected request and verifies it is equal to the referenceUrl.

Definition at line 51 of file TrackerRequestUrlCreatorTest.cpp.

template<class T>
static QByteArray Protocols::BitTorrent::Trackers::Testing::TrackerRequestUrlCreatorTest::stringifyNum num  )  [inline, static, private]
 

Returns num transformed into string.

Definition at line 61 of file TrackerRequestUrlCreatorTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::TrackerRequestUrlCreatorTest::testCreateRequestUrlCompleteRequest  )  [inline]
 

Verifies that a sample complete request URL will be created successfuly.

Definition at line 87 of file TrackerRequestUrlCreatorTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::TrackerRequestUrlCreatorTest::testCreateRequestUrlMaxNumbers  )  [inline]
 

Verifies that maximal numbers are created correctly.

Definition at line 127 of file TrackerRequestUrlCreatorTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::TrackerRequestUrlCreatorTest::testCreateRequestUrlMinimalRequest  )  [inline]
 

Verifies that a sample minimal request URL will be created successfuly.

Definition at line 81 of file TrackerRequestUrlCreatorTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::TrackerRequestUrlCreatorTest::testCreateRequestUrlMinNumbers  )  [inline]
 

Verifies that minimal numbers are created correctly.

Definition at line 93 of file TrackerRequestUrlCreatorTest.cpp.


Member Data Documentation

const TrackerRequest Protocols::BitTorrent::Trackers::Testing::TrackerRequestUrlCreatorTest::CompleteRequest [private]
 

Definition at line 75 of file TrackerRequestUrlCreatorTest.cpp.

const TrackerRequest Protocols::BitTorrent::Trackers::Testing::TrackerRequestUrlCreatorTest::MinimalRequest [private]
 

Definition at line 74 of file TrackerRequestUrlCreatorTest.cpp.

const QByteArray Protocols::BitTorrent::Trackers::Testing::TrackerRequestUrlCreatorTest::ReferenceAnnounceUrl [private]
 

Definition at line 68 of file TrackerRequestUrlCreatorTest.cpp.

const QByteArray Protocols::BitTorrent::Trackers::Testing::TrackerRequestUrlCreatorTest::ReferenceCompleteRequestUrl [private]
 

Definition at line 72 of file TrackerRequestUrlCreatorTest.cpp.

const QByteArray Protocols::BitTorrent::Trackers::Testing::TrackerRequestUrlCreatorTest::ReferenceCompleteRequestUrlQueryPart [private]
 

Definition at line 71 of file TrackerRequestUrlCreatorTest.cpp.

const QByteArray Protocols::BitTorrent::Trackers::Testing::TrackerRequestUrlCreatorTest::ReferenceMinimalRequestUrl [private]
 

Definition at line 70 of file TrackerRequestUrlCreatorTest.cpp.

const QByteArray Protocols::BitTorrent::Trackers::Testing::TrackerRequestUrlCreatorTest::ReferenceMinimalRequestUrlQueryPart [private]
 

Definition at line 69 of file TrackerRequestUrlCreatorTest.cpp.


The documentation for this class was generated from the following file: