Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest Class Reference

Inherits TestFixture.

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

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

Collaboration graph
[legend]
List of all members.

Detailed Description

TrackerRequestSessionFactoryImpl class testing unit.

Definition at line 40 of file TrackerRequestSessionFactoryImplTest.cpp.

Public Member Functions

 TrackerRequestSessionFactoryImplTest ()
 Default ctor.
void setUp ()
void tearDown ()
void testCreateSessionTorrentWithAnnounceUrlWillReturnSingleTrackerRequestSession ()
 Verifies that SingleTrackerRequestSession is created with proper torrent.
void testCreateSessionTorrentWithAnnounceListWillReturnMultiTrackerRequestSession ()
 Verifies that MultiTrackerRequestSession is created with proper torrent.
void testDestroySessionOnlyOneSessionCreated ()
 Creating a session and destroying must "empty" the factory.
void testDestroySessionTwoSessionsCreated ()
void testDestroyAllCreatedSessionsThreeSessionsCreated ()
 Creating three sessions and destroying them must "empty" the factory.
void testTrackerRequestSessionEstablishedNotificationWillBeForwarded ()
void trackerRequestSessionErrorNotificationWillBeForwarded ()
void trackerRequestSessionResponseRecievedNotificationWillBeForwarded ()
void trackerRequestSessionClosingNotificationWillBeForwarded ()
void trackerRequestSessionClosedNotificationWillBeForwarded ()

Private Member Functions

 CPPUNIT_TEST_SUITE (TrackerRequestSessionFactoryImplTest)
 CPPUNIT_TEST (testCreateSessionTorrentWithAnnounceUrlWillReturnSingleTrackerRequestSession)
 CPPUNIT_TEST (testCreateSessionTorrentWithAnnounceListWillReturnMultiTrackerRequestSession)
 CPPUNIT_TEST (testDestroySessionOnlyOneSessionCreated)
 CPPUNIT_TEST (testDestroySessionTwoSessionsCreated)
 CPPUNIT_TEST (testDestroyAllCreatedSessionsThreeSessionsCreated)
 CPPUNIT_TEST (testTrackerRequestSessionEstablishedNotificationWillBeForwarded)
 CPPUNIT_TEST (trackerRequestSessionErrorNotificationWillBeForwarded)
 CPPUNIT_TEST (trackerRequestSessionResponseRecievedNotificationWillBeForwarded)
 CPPUNIT_TEST (trackerRequestSessionClosingNotificationWillBeForwarded)
 CPPUNIT_TEST (trackerRequestSessionClosedNotificationWillBeForwarded)
 CPPUNIT_TEST_SUITE_END ()

Private Attributes

auto_ptr< TrackerRequestSessionFactoryStatusMock > factoryStatus
auto_ptr< TrackerRequestSessionFactoryImplfactoryReal
auto_ptr< TrackerRequestSessionFactoryImplDriver > factory
Torrent torrentWithAnnounceUrl
Torrent torrentWithAnnounceList
TrackerResponse trackerResponse
QString errorMessage


Constructor & Destructor Documentation

Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::TrackerRequestSessionFactoryImplTest  ) 
 

Default ctor.

Definition at line 230 of file TrackerRequestSessionFactoryImplTest.cpp.


Member Function Documentation

Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::CPPUNIT_TEST trackerRequestSessionClosedNotificationWillBeForwarded   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::CPPUNIT_TEST trackerRequestSessionClosingNotificationWillBeForwarded   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::CPPUNIT_TEST trackerRequestSessionResponseRecievedNotificationWillBeForwarded   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::CPPUNIT_TEST trackerRequestSessionErrorNotificationWillBeForwarded   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::CPPUNIT_TEST testTrackerRequestSessionEstablishedNotificationWillBeForwarded   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::CPPUNIT_TEST testDestroyAllCreatedSessionsThreeSessionsCreated   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::CPPUNIT_TEST testDestroySessionTwoSessionsCreated   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::CPPUNIT_TEST testDestroySessionOnlyOneSessionCreated   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::CPPUNIT_TEST testCreateSessionTorrentWithAnnounceListWillReturnMultiTrackerRequestSession   )  [private]
 

Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::CPPUNIT_TEST testCreateSessionTorrentWithAnnounceUrlWillReturnSingleTrackerRequestSession   )  [private]
 

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

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

void Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::setUp  )  [inline]
 

Definition at line 67 of file TrackerRequestSessionFactoryImplTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::tearDown  )  [inline]
 

Definition at line 76 of file TrackerRequestSessionFactoryImplTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::testCreateSessionTorrentWithAnnounceListWillReturnMultiTrackerRequestSession  )  [inline]
 

Verifies that MultiTrackerRequestSession is created with proper torrent.

Definition at line 92 of file TrackerRequestSessionFactoryImplTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::testCreateSessionTorrentWithAnnounceUrlWillReturnSingleTrackerRequestSession  )  [inline]
 

Verifies that SingleTrackerRequestSession is created with proper torrent.

Definition at line 84 of file TrackerRequestSessionFactoryImplTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::testDestroyAllCreatedSessionsThreeSessionsCreated  )  [inline]
 

Creating three sessions and destroying them must "empty" the factory.

Definition at line 125 of file TrackerRequestSessionFactoryImplTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::testDestroySessionOnlyOneSessionCreated  )  [inline]
 

Creating a session and destroying must "empty" the factory.

Definition at line 100 of file TrackerRequestSessionFactoryImplTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::testDestroySessionTwoSessionsCreated  )  [inline]
 

Creating two sessions and destroying only the first one must "keep" the second session "in the factory".

Definition at line 113 of file TrackerRequestSessionFactoryImplTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::testTrackerRequestSessionEstablishedNotificationWillBeForwarded  )  [inline]
 

Verifies that if the trackerRequestSessionEstablished() notification is recieved from a created session, it will be forwared to the factory's notifications listener.

Definition at line 145 of file TrackerRequestSessionFactoryImplTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::trackerRequestSessionClosedNotificationWillBeForwarded  )  [inline]
 

Verifies that if the trackerRequestSessionClosed() notification is recieved from a created session, it will be forwared to the factory's notifications listener.

Definition at line 214 of file TrackerRequestSessionFactoryImplTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::trackerRequestSessionClosingNotificationWillBeForwarded  )  [inline]
 

Verifies that if the trackerRequestSessionClosing() notification is recieved from a created session, it will be forwared to the factory's notifications listener.

Definition at line 197 of file TrackerRequestSessionFactoryImplTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::trackerRequestSessionErrorNotificationWillBeForwarded  )  [inline]
 

Verifies that if the trackerRequestSessionError() notification is recieved from a created session, it will be forwared to the factory's notifications listener.

Definition at line 162 of file TrackerRequestSessionFactoryImplTest.cpp.

void Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::trackerRequestSessionResponseRecievedNotificationWillBeForwarded  )  [inline]
 

Verifies that if the trackerRequestSessionResponseRecieved() notification is recieved from a created session, it will be forwared to the factory's notifications listener.

Definition at line 179 of file TrackerRequestSessionFactoryImplTest.cpp.


Member Data Documentation

QString Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::errorMessage [private]
 

Definition at line 62 of file TrackerRequestSessionFactoryImplTest.cpp.

auto_ptr<TrackerRequestSessionFactoryImplDriver> Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::factory [private]
 

Definition at line 57 of file TrackerRequestSessionFactoryImplTest.cpp.

auto_ptr<TrackerRequestSessionFactoryImpl> Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::factoryReal [private]
 

Definition at line 56 of file TrackerRequestSessionFactoryImplTest.cpp.

auto_ptr<TrackerRequestSessionFactoryStatusMock> Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::factoryStatus [private]
 

Definition at line 55 of file TrackerRequestSessionFactoryImplTest.cpp.

Torrent Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::torrentWithAnnounceList [private]
 

Definition at line 60 of file TrackerRequestSessionFactoryImplTest.cpp.

Torrent Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::torrentWithAnnounceUrl [private]
 

Definition at line 59 of file TrackerRequestSessionFactoryImplTest.cpp.

TrackerResponse Protocols::BitTorrent::Trackers::Testing::TrackerRequestSessionFactoryImplTest::trackerResponse [private]
 

Definition at line 61 of file TrackerRequestSessionFactoryImplTest.cpp.


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