Protocols::BitTorrent::Trackers::Testing::PeerInfoTest Class Reference

Inherits TestFixture.

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

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

Collaboration graph
[legend]
List of all members.

Detailed Description

PeerInfo class testing unit.

Definition at line 35 of file PeerInfoTest.cpp.

Public Member Functions

void testDefaultCtorCreatesEmptyPeerInfo ()
 Verifies default ctor creates correct empty peer info.
void testCtorCreatesCorrectPeerInfo ()
 Verifies ctor creates correct peer info according to arguments.
void testCompareTwoEqualNonEmptyPeerInfos ()
 Verifies operator== and operator!= correctness on non-empty peer infos.
void testCompareTwoEqualEmptyPeerInfos ()
 Verifies operator== and operator!= correctness on empty peer infos.
void testCompareTwoDifferentNonEmptyPeerInfos ()
 Verifies operator== and operator!= on different non-empty peer infos.
void testCompareEmptyAndNonEmptyPeerInfos ()
 Verifies operator== and operator!= on empty with non-empty peer infos.
void testCopyCtor ()
 The copy ctor should create equal objects.
void testAssignment ()
 After assignment the objects should be equal.
void testModifyingACopyDoesNotChangeTheOriginal ()
 Lazy copying is used. Verify that a copy is made prior to modification.
void testSetHostSetsHostCorrectly ()
 Verifies host setting correctness.
void testSetPortSetsPortCorrectly ()
 Verifies port setting correctness.
void testSetPeerIdSetsPeerIdCorrectly ()
 Verifies peer ID setting correctness.
void testSetPeerIdTwice ()
void testToUriEmptyPeerInfo ()
 Verifies toUri() member function correctness on empty peer info.
void testToUriEverythingSet ()
 Verifies toUri() member function correctness on non-empty peer info.
void testFromUriEmptyUri ()
 Verifies fromUri() function correctness on "empty" URI (scheme is present).
void testFromUriPortUnspecified ()
 Verifies fromUri() function correctness on URI without port specified.
void testFromUriPeerIdUnspecified ()
 Verifies fromUri() function correctness on URI without peer ID specified.
void testFromUriEverythingSpecified ()
 Verifies fromUri() function correctness on URI with everything specified.

Private Member Functions

 CPPUNIT_TEST_SUITE (PeerInfoTest)
 CPPUNIT_TEST (testDefaultCtorCreatesEmptyPeerInfo)
 CPPUNIT_TEST (testCtorCreatesCorrectPeerInfo)
 CPPUNIT_TEST (testCompareTwoEqualNonEmptyPeerInfos)
 CPPUNIT_TEST (testCompareTwoEqualEmptyPeerInfos)
 CPPUNIT_TEST (testCompareTwoDifferentNonEmptyPeerInfos)
 CPPUNIT_TEST (testCompareEmptyAndNonEmptyPeerInfos)
 CPPUNIT_TEST (testCopyCtor)
 CPPUNIT_TEST (testAssignment)
 CPPUNIT_TEST (testModifyingACopyDoesNotChangeTheOriginal)
 CPPUNIT_TEST (testSetHostSetsHostCorrectly)
 CPPUNIT_TEST (testSetPortSetsPortCorrectly)
 CPPUNIT_TEST (testSetPeerIdSetsPeerIdCorrectly)
 CPPUNIT_TEST (testSetPeerIdTwice)
 CPPUNIT_TEST (testToUriEmptyPeerInfo)
 CPPUNIT_TEST (testToUriEverythingSet)
 CPPUNIT_TEST (testFromUriEmptyUri)
 CPPUNIT_TEST (testFromUriPortUnspecified)
 CPPUNIT_TEST (testFromUriPeerIdUnspecified)
 CPPUNIT_TEST (testFromUriEverythingSpecified)
 CPPUNIT_TEST_SUITE_END ()


Member Function Documentation

Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::CPPUNIT_TEST testFromUriEverythingSpecified   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::CPPUNIT_TEST testFromUriPeerIdUnspecified   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::CPPUNIT_TEST testFromUriPortUnspecified   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::CPPUNIT_TEST testFromUriEmptyUri   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::CPPUNIT_TEST testToUriEverythingSet   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::CPPUNIT_TEST testToUriEmptyPeerInfo   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::CPPUNIT_TEST testSetPeerIdTwice   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::CPPUNIT_TEST testSetPeerIdSetsPeerIdCorrectly   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::CPPUNIT_TEST testSetPortSetsPortCorrectly   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::CPPUNIT_TEST testSetHostSetsHostCorrectly   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::CPPUNIT_TEST testModifyingACopyDoesNotChangeTheOriginal   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::CPPUNIT_TEST testAssignment   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::CPPUNIT_TEST testCopyCtor   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::CPPUNIT_TEST testCompareEmptyAndNonEmptyPeerInfos   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::CPPUNIT_TEST testCompareTwoDifferentNonEmptyPeerInfos   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::CPPUNIT_TEST testCompareTwoEqualEmptyPeerInfos   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::CPPUNIT_TEST testCompareTwoEqualNonEmptyPeerInfos   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::CPPUNIT_TEST testCtorCreatesCorrectPeerInfo   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::CPPUNIT_TEST testDefaultCtorCreatesEmptyPeerInfo   )  [private]
 

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

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

void Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::testAssignment  )  [inline]
 

After assignment the objects should be equal.

Definition at line 138 of file PeerInfoTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::testCompareEmptyAndNonEmptyPeerInfos  )  [inline]
 

Verifies operator== and operator!= on empty with non-empty peer infos.

Definition at line 117 of file PeerInfoTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::testCompareTwoDifferentNonEmptyPeerInfos  )  [inline]
 

Verifies operator== and operator!= on different non-empty peer infos.

Definition at line 105 of file PeerInfoTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::testCompareTwoEqualEmptyPeerInfos  )  [inline]
 

Verifies operator== and operator!= correctness on empty peer infos.

Definition at line 95 of file PeerInfoTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::testCompareTwoEqualNonEmptyPeerInfos  )  [inline]
 

Verifies operator== and operator!= correctness on non-empty peer infos.

Definition at line 83 of file PeerInfoTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::testCopyCtor  )  [inline]
 

The copy ctor should create equal objects.

Definition at line 128 of file PeerInfoTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::testCtorCreatesCorrectPeerInfo  )  [inline]
 

Verifies ctor creates correct peer info according to arguments.

Definition at line 71 of file PeerInfoTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::testDefaultCtorCreatesEmptyPeerInfo  )  [inline]
 

Verifies default ctor creates correct empty peer info.

Definition at line 61 of file PeerInfoTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::testFromUriEmptyUri  )  [inline]
 

Verifies fromUri() function correctness on "empty" URI (scheme is present).

Definition at line 229 of file PeerInfoTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::testFromUriEverythingSpecified  )  [inline]
 

Verifies fromUri() function correctness on URI with everything specified.

Definition at line 256 of file PeerInfoTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::testFromUriPeerIdUnspecified  )  [inline]
 

Verifies fromUri() function correctness on URI without peer ID specified.

Definition at line 246 of file PeerInfoTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::testFromUriPortUnspecified  )  [inline]
 

Verifies fromUri() function correctness on URI without port specified.

Definition at line 236 of file PeerInfoTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::testModifyingACopyDoesNotChangeTheOriginal  )  [inline]
 

Lazy copying is used. Verify that a copy is made prior to modification.

Definition at line 149 of file PeerInfoTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::testSetHostSetsHostCorrectly  )  [inline]
 

Verifies host setting correctness.

Definition at line 164 of file PeerInfoTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::testSetPeerIdSetsPeerIdCorrectly  )  [inline]
 

Verifies peer ID setting correctness.

Definition at line 182 of file PeerInfoTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::testSetPeerIdTwice  )  [inline]
 

Verifies that if setting two different peer IDs, the second one will replace the first one.

Definition at line 195 of file PeerInfoTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::testSetPortSetsPortCorrectly  )  [inline]
 

Verifies port setting correctness.

Definition at line 173 of file PeerInfoTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::testToUriEmptyPeerInfo  )  [inline]
 

Verifies toUri() member function correctness on empty peer info.

Definition at line 207 of file PeerInfoTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::PeerInfoTest::testToUriEverythingSet  )  [inline]
 

Verifies toUri() member function correctness on non-empty peer info.

Definition at line 219 of file PeerInfoTest.cpp.


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