Protocols::BitTorrent::Torrents::Testing::TorrentTest Class Reference

Inherits TestFixture.

Inheritance diagram for Protocols::BitTorrent::Torrents::Testing::TorrentTest:

Inheritance graph
[legend]
Collaboration diagram for Protocols::BitTorrent::Torrents::Testing::TorrentTest:

Collaboration graph
[legend]
List of all members.

Detailed Description

Torrent class testing unit.

Only basic class testings are done here. For Torrent parsing tests see TorrentParserTest.

Definition at line 39 of file TorrentTest.cpp.

Public Member Functions

 TorrentTest ()
 Default ctor.
void testCompareTwoEqualNonEmptyTorrents ()
 Verifies operator== and operator!= correctness on non-empty torrents.
void testCompareTwoEqualEmptyTorrents ()
 Verifies operator== and operator!= correctness on empty torrents.
void testCompareTwoDifferentNonEmptyTorrents ()
 Verifies operator== and operator!= on different non-empty torrents.
void testCompareEmptyAndNonEmptyTorrents ()
 Verifies operator== and operator!= on empty with non-empty torrents.
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.

Private Member Functions

 CPPUNIT_TEST_SUITE (TorrentTest)
 CPPUNIT_TEST (testCompareTwoEqualNonEmptyTorrents)
 CPPUNIT_TEST (testCompareTwoEqualEmptyTorrents)
 CPPUNIT_TEST (testCompareTwoDifferentNonEmptyTorrents)
 CPPUNIT_TEST (testCompareEmptyAndNonEmptyTorrents)
 CPPUNIT_TEST (testCopyCtor)
 CPPUNIT_TEST (testAssignment)
 CPPUNIT_TEST (testModifyingACopyDoesNotChangeTheOriginal)
 CPPUNIT_TEST_SUITE_END ()

Private Attributes

const QString TorrentFileOk1
const QString TorrentFileOk2


Constructor & Destructor Documentation

Protocols::BitTorrent::Torrents::Testing::TorrentTest::TorrentTest  ) 
 

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 145 of file TorrentTest.cpp.


Member Function Documentation

Protocols::BitTorrent::Torrents::Testing::TorrentTest::CPPUNIT_TEST testModifyingACopyDoesNotChangeTheOriginal   )  [private]
 

Protocols::BitTorrent::Torrents::Testing::TorrentTest::CPPUNIT_TEST testAssignment   )  [private]
 

Protocols::BitTorrent::Torrents::Testing::TorrentTest::CPPUNIT_TEST testCopyCtor   )  [private]
 

Protocols::BitTorrent::Torrents::Testing::TorrentTest::CPPUNIT_TEST testCompareEmptyAndNonEmptyTorrents   )  [private]
 

Protocols::BitTorrent::Torrents::Testing::TorrentTest::CPPUNIT_TEST testCompareTwoDifferentNonEmptyTorrents   )  [private]
 

Protocols::BitTorrent::Torrents::Testing::TorrentTest::CPPUNIT_TEST testCompareTwoEqualEmptyTorrents   )  [private]
 

Protocols::BitTorrent::Torrents::Testing::TorrentTest::CPPUNIT_TEST testCompareTwoEqualNonEmptyTorrents   )  [private]
 

Protocols::BitTorrent::Torrents::Testing::TorrentTest::CPPUNIT_TEST_SUITE TorrentTest   )  [private]
 

Protocols::BitTorrent::Torrents::Testing::TorrentTest::CPPUNIT_TEST_SUITE_END  )  [private]
 

void Protocols::BitTorrent::Torrents::Testing::TorrentTest::testAssignment  )  [inline]
 

After assignment the objects should be equal.

Definition at line 113 of file TorrentTest.cpp.

void Protocols::BitTorrent::Torrents::Testing::TorrentTest::testCompareEmptyAndNonEmptyTorrents  )  [inline]
 

Verifies operator== and operator!= on empty with non-empty torrents.

Definition at line 91 of file TorrentTest.cpp.

void Protocols::BitTorrent::Torrents::Testing::TorrentTest::testCompareTwoDifferentNonEmptyTorrents  )  [inline]
 

Verifies operator== and operator!= on different non-empty torrents.

Definition at line 79 of file TorrentTest.cpp.

void Protocols::BitTorrent::Torrents::Testing::TorrentTest::testCompareTwoEqualEmptyTorrents  )  [inline]
 

Verifies operator== and operator!= correctness on empty torrents.

Definition at line 70 of file TorrentTest.cpp.

void Protocols::BitTorrent::Torrents::Testing::TorrentTest::testCompareTwoEqualNonEmptyTorrents  )  [inline]
 

Verifies operator== and operator!= correctness on non-empty torrents.

Definition at line 58 of file TorrentTest.cpp.

void Protocols::BitTorrent::Torrents::Testing::TorrentTest::testCopyCtor  )  [inline]
 

The copy ctor should create equal objects.

Definition at line 102 of file TorrentTest.cpp.

void Protocols::BitTorrent::Torrents::Testing::TorrentTest::testModifyingACopyDoesNotChangeTheOriginal  )  [inline]
 

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

Definition at line 125 of file TorrentTest.cpp.


Member Data Documentation

const QString Protocols::BitTorrent::Torrents::Testing::TorrentTest::TorrentFileOk1 [private]
 

Definition at line 51 of file TorrentTest.cpp.

const QString Protocols::BitTorrent::Torrents::Testing::TorrentTest::TorrentFileOk2 [private]
 

Definition at line 52 of file TorrentTest.cpp.


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