Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest Class Reference

Inherits TestFixture.

Inheritance diagram for Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest:

Inheritance graph
[legend]
Collaboration diagram for Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest:

Collaboration graph
[legend]
List of all members.

Detailed Description

Todo:
Test with hasFastExtension disabled.

u/d speeds, snubbed flags

Definition at line 40 of file TransferSessionImplTest.cpp.

Public Member Functions

 TransferSessionImplTest ()
void setUp ()
void tearDown ()
void refWeAreChoked (bool value)
void refWeAreInterested (bool value)
void refWeAreSnubbed (bool value, int secondsSinceLastReceived=0)
void refWeAreSeeder (bool isSeeder)
void refPeerIsChoked (bool value)
void refPeerIsInterested (bool value)
void refPeerIsSnubbed (bool value, int secondsSinceLastSent=0)
void refPeerIsSeeder (bool isSeeder)
void refTotalDownloadedIs (qint64 count)
void refTotalUploadedIs (qint64 count)
void refCurrentDownloadSpeedIs (qint64 speed, int secondsSinceLastReceive=0)
void refCurrentUploadSpeedIs (qint64 speed, int secondsSinceLastSend=0)
void refWePiecesAvailable (const QBitArray &pieces)
void refPeerPiecesAvailable (const QBitArray &pieces)
void refReceivedPacketFromPeer (Packet packet, int secondsSinceLastReceive=0)
void refReceivedPacketFromPeerClosesSession (Packet packet)
void refSentPacketToPeer (Packet packet, int secondsSinceLastSend=0)
void testCorrectInitialState ()
void testWeGetChoked ()
void testWeGetUnchoked ()
void testWeGetUnchokedAndThenChokedAgain ()
void testChokePeer ()
void testUnchokePeer ()
void testUnchokePeerAndThenChokeItAgain ()
void testWeGetInterested ()
void testWeGetNotInterested ()
void testWeGetInterestedAndThenNotInterestedAgain ()
void testPeerGetsInterested ()
void testPeerGetsNotInterested ()
void testPeerGetsInterestedAndThenNotInterestedAgain ()
void testOnlyReceivingPieceIncreasesTotalDownload ()
void testOnlySendingPieceIncreasesTotalUpload ()
void testClosingTransferSessionClosesGenericSession ()
void testForwardsClosingAndClosedNotificationFromGenericSession ()
void testCurrentDownloadSpeedIsMovingAverageMoveTimeout ()
void testCurrentDownloadSpeedIsMovingAverageMoveEachSecond ()
void testCurrentUploadSpeedIsMovingAverageMoveTimeout ()
void testCurrentUploadSpeedIsMovingAverageMoveEachSecond ()
void testWeAreSnubbedIfPeerIsUnchokedButDoesNotReciprocate ()
 A peer considers itself snubbed if it does not get a Piece for a while.
void testPeerIsSnubbedIfWeAreUnchokedButDoNotReciprocate ()
void testReceivingABadPacketClosesSession ()
void testReceivingBitFieldSetsPeerPiecesAvailable ()
void testReceivingASecondBitFieldClosesSession ()
void testSendingBitFieldSetsWePiecesAvailable ()
void testReceivingHaveAllSetsAllPeerPiecesAvailable ()
void testReceivingASecondHaveAllClosesSession ()
void testSendingHaveAllSetsAllWePiecesAvailable ()
void testReceivingHaveNoneResetsAllPeerPiecesAvailable ()
void testReceivingASecondHaveNoneClosesSession ()
void testSendingHaveNoneResetsAllWePiecesAvailable ()
void testReceivingHavePacketSetsAPiecesAvailableBit ()
void testSendingHavePacketSetsAPiecesAvailableBit ()
void testPeerIsSeederIfItHasAllPieces ()
void testWeAreSeederIfItHaveAllPieces ()
void testPeerIsSeederAfterReportingItHasAllPieces ()
void testWeAreSeederAfterReportingWeHaveAllPieces ()

Private Member Functions

 CPPUNIT_TEST_SUITE (TransferSessionImplTest)
 CPPUNIT_TEST (testCorrectInitialState)
 CPPUNIT_TEST (testWeGetChoked)
 CPPUNIT_TEST (testWeGetUnchoked)
 CPPUNIT_TEST (testWeGetUnchokedAndThenChokedAgain)
 CPPUNIT_TEST (testChokePeer)
 CPPUNIT_TEST (testUnchokePeer)
 CPPUNIT_TEST (testUnchokePeerAndThenChokeItAgain)
 CPPUNIT_TEST (testWeGetInterested)
 CPPUNIT_TEST (testWeGetNotInterested)
 CPPUNIT_TEST (testWeGetInterestedAndThenNotInterestedAgain)
 CPPUNIT_TEST (testPeerGetsInterested)
 CPPUNIT_TEST (testPeerGetsNotInterested)
 CPPUNIT_TEST (testPeerGetsInterestedAndThenNotInterestedAgain)
 CPPUNIT_TEST (testOnlyReceivingPieceIncreasesTotalDownload)
 CPPUNIT_TEST (testOnlySendingPieceIncreasesTotalUpload)
 CPPUNIT_TEST (testClosingTransferSessionClosesGenericSession)
 CPPUNIT_TEST (testForwardsClosingAndClosedNotificationFromGenericSession)
 CPPUNIT_TEST (testCurrentDownloadSpeedIsMovingAverageMoveTimeout)
 CPPUNIT_TEST (testCurrentDownloadSpeedIsMovingAverageMoveEachSecond)
 CPPUNIT_TEST (testCurrentUploadSpeedIsMovingAverageMoveTimeout)
 CPPUNIT_TEST (testCurrentUploadSpeedIsMovingAverageMoveEachSecond)
 CPPUNIT_TEST (testWeAreSnubbedIfPeerIsUnchokedButDoesNotReciprocate)
 CPPUNIT_TEST (testPeerIsSnubbedIfWeAreUnchokedButDoNotReciprocate)
 CPPUNIT_TEST (testReceivingABadPacketClosesSession)
 CPPUNIT_TEST (testReceivingBitFieldSetsPeerPiecesAvailable)
 CPPUNIT_TEST (testReceivingASecondBitFieldClosesSession)
 CPPUNIT_TEST (testSendingBitFieldSetsWePiecesAvailable)
 CPPUNIT_TEST (testReceivingHaveAllSetsAllPeerPiecesAvailable)
 CPPUNIT_TEST (testReceivingASecondHaveAllClosesSession)
 CPPUNIT_TEST (testSendingHaveAllSetsAllWePiecesAvailable)
 CPPUNIT_TEST (testReceivingHaveNoneResetsAllPeerPiecesAvailable)
 CPPUNIT_TEST (testReceivingASecondHaveNoneClosesSession)
 CPPUNIT_TEST (testSendingHaveNoneResetsAllWePiecesAvailable)
 CPPUNIT_TEST (testReceivingHavePacketSetsAPiecesAvailableBit)
 CPPUNIT_TEST (testSendingHavePacketSetsAPiecesAvailableBit)
 CPPUNIT_TEST (testPeerIsSeederIfItHasAllPieces)
 CPPUNIT_TEST (testWeAreSeederIfItHaveAllPieces)
 CPPUNIT_TEST (testPeerIsSeederAfterReportingItHasAllPieces)
 CPPUNIT_TEST (testWeAreSeederAfterReportingWeHaveAllPieces)
 CPPUNIT_TEST_SUITE_END ()

Private Attributes

auto_ptr< SessionMock > genericSession
auto_ptr< IntegerResetStopwatchMock > downloadStopwatch
auto_ptr< IntegerResetStopwatchMock > uploadStopwatch
auto_ptr< TransferSessionStatusMock > sessionStatus
auto_ptr< TransferSessionImplsessionReal
auto_ptr< TransferSessionImplDriver > session
const Handshake handshake
const BadPacket badPacket
const Choke choke
const Unchoke unchoke
const Interested interested
const NotInterested notInterested
const Piece piece1
const Piece piece2
const Piece piece3
const BitField bitField
const HaveAll haveAll
const HaveNone haveNone
const Have have5
const Have have11
const QBitArray allPiecesAvailable
QBitArray piecesAvailable
const QBitArray noPiecesAvailable

Static Private Attributes

static const int AverageLength = 20
static const int SnubbedTimeout = 60


Constructor & Destructor Documentation

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::TransferSessionImplTest  )  [inline]
 

Definition at line 113 of file TransferSessionImplTest.cpp.


Member Function Documentation

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testWeAreSeederAfterReportingWeHaveAllPieces   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testPeerIsSeederAfterReportingItHasAllPieces   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testWeAreSeederIfItHaveAllPieces   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testPeerIsSeederIfItHasAllPieces   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testSendingHavePacketSetsAPiecesAvailableBit   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testReceivingHavePacketSetsAPiecesAvailableBit   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testSendingHaveNoneResetsAllWePiecesAvailable   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testReceivingASecondHaveNoneClosesSession   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testReceivingHaveNoneResetsAllPeerPiecesAvailable   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testSendingHaveAllSetsAllWePiecesAvailable   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testReceivingASecondHaveAllClosesSession   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testReceivingHaveAllSetsAllPeerPiecesAvailable   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testSendingBitFieldSetsWePiecesAvailable   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testReceivingASecondBitFieldClosesSession   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testReceivingBitFieldSetsPeerPiecesAvailable   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testReceivingABadPacketClosesSession   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testPeerIsSnubbedIfWeAreUnchokedButDoNotReciprocate   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testWeAreSnubbedIfPeerIsUnchokedButDoesNotReciprocate   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testCurrentUploadSpeedIsMovingAverageMoveEachSecond   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testCurrentUploadSpeedIsMovingAverageMoveTimeout   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testCurrentDownloadSpeedIsMovingAverageMoveEachSecond   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testCurrentDownloadSpeedIsMovingAverageMoveTimeout   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testForwardsClosingAndClosedNotificationFromGenericSession   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testClosingTransferSessionClosesGenericSession   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testOnlySendingPieceIncreasesTotalUpload   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testOnlyReceivingPieceIncreasesTotalDownload   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testPeerGetsInterestedAndThenNotInterestedAgain   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testPeerGetsNotInterested   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testPeerGetsInterested   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testWeGetInterestedAndThenNotInterestedAgain   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testWeGetNotInterested   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testWeGetInterested   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testUnchokePeerAndThenChokeItAgain   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testUnchokePeer   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testChokePeer   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testWeGetUnchokedAndThenChokedAgain   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testWeGetUnchoked   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testWeGetChoked   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST testCorrectInitialState   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST_SUITE TransferSessionImplTest   )  [private]
 

Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::CPPUNIT_TEST_SUITE_END  )  [private]
 

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::refCurrentDownloadSpeedIs qint64  speed,
int  secondsSinceLastReceive = 0
[inline]
 

Definition at line 220 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::refCurrentUploadSpeedIs qint64  speed,
int  secondsSinceLastSend = 0
[inline]
 

Definition at line 231 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::refPeerIsChoked bool  value  )  [inline]
 

Definition at line 182 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::refPeerIsInterested bool  value  )  [inline]
 

Definition at line 188 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::refPeerIsSeeder bool  isSeeder  )  [inline]
 

Definition at line 202 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::refPeerIsSnubbed bool  value,
int  secondsSinceLastSent = 0
[inline]
 

Definition at line 194 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::refPeerPiecesAvailable const QBitArray &  pieces  )  [inline]
 

Definition at line 247 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::refReceivedPacketFromPeer Packet  packet,
int  secondsSinceLastReceive = 0
[inline]
 

Definition at line 253 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::refReceivedPacketFromPeerClosesSession Packet  packet  )  [inline]
 

Definition at line 274 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::refSentPacketToPeer Packet  packet,
int  secondsSinceLastSend = 0
[inline]
 

Definition at line 285 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::refTotalDownloadedIs qint64  count  )  [inline]
 

Definition at line 208 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::refTotalUploadedIs qint64  count  )  [inline]
 

Definition at line 214 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::refWeAreChoked bool  value  )  [inline]
 

Definition at line 156 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::refWeAreInterested bool  value  )  [inline]
 

Definition at line 162 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::refWeAreSeeder bool  isSeeder  )  [inline]
 

Definition at line 176 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::refWeAreSnubbed bool  value,
int  secondsSinceLastReceived = 0
[inline]
 

Definition at line 168 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::refWePiecesAvailable const QBitArray &  pieces  )  [inline]
 

Definition at line 241 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::setUp  )  [inline]
 

Definition at line 132 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::tearDown  )  [inline]
 

Definition at line 146 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testChokePeer  )  [inline]
 

Definition at line 344 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testClosingTransferSessionClosesGenericSession  )  [inline]
 

Definition at line 430 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testCorrectInitialState  )  [inline]
 

Definition at line 307 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testCurrentDownloadSpeedIsMovingAverageMoveEachSecond  )  [inline]
 

Definition at line 466 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testCurrentDownloadSpeedIsMovingAverageMoveTimeout  )  [inline]
 

Definition at line 451 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testCurrentUploadSpeedIsMovingAverageMoveEachSecond  )  [inline]
 

Definition at line 500 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testCurrentUploadSpeedIsMovingAverageMoveTimeout  )  [inline]
 

Definition at line 485 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testForwardsClosingAndClosedNotificationFromGenericSession  )  [inline]
 

Definition at line 438 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testOnlyReceivingPieceIncreasesTotalDownload  )  [inline]
 

Definition at line 399 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testOnlySendingPieceIncreasesTotalUpload  )  [inline]
 

Definition at line 415 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testPeerGetsInterested  )  [inline]
 

Definition at line 381 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testPeerGetsInterestedAndThenNotInterestedAgain  )  [inline]
 

Definition at line 393 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testPeerGetsNotInterested  )  [inline]
 

Definition at line 387 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testPeerIsSeederAfterReportingItHasAllPieces  )  [inline]
 

Definition at line 649 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testPeerIsSeederIfItHasAllPieces  )  [inline]
 

Definition at line 635 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testPeerIsSnubbedIfWeAreUnchokedButDoNotReciprocate  )  [inline]
 

Definition at line 539 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testReceivingABadPacketClosesSession  )  [inline]
 

Definition at line 550 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testReceivingASecondBitFieldClosesSession  )  [inline]
 

Definition at line 561 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testReceivingASecondHaveAllClosesSession  )  [inline]
 

Definition at line 579 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testReceivingASecondHaveNoneClosesSession  )  [inline]
 

Definition at line 597 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testReceivingBitFieldSetsPeerPiecesAvailable  )  [inline]
 

Definition at line 555 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testReceivingHaveAllSetsAllPeerPiecesAvailable  )  [inline]
 

Definition at line 573 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testReceivingHaveNoneResetsAllPeerPiecesAvailable  )  [inline]
 

Definition at line 591 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testReceivingHavePacketSetsAPiecesAvailableBit  )  [inline]
 

Definition at line 609 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testSendingBitFieldSetsWePiecesAvailable  )  [inline]
 

Definition at line 567 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testSendingHaveAllSetsAllWePiecesAvailable  )  [inline]
 

Definition at line 585 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testSendingHaveNoneResetsAllWePiecesAvailable  )  [inline]
 

Definition at line 603 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testSendingHavePacketSetsAPiecesAvailableBit  )  [inline]
 

Definition at line 622 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testUnchokePeer  )  [inline]
 

Definition at line 351 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testUnchokePeerAndThenChokeItAgain  )  [inline]
 

Definition at line 357 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testWeAreSeederAfterReportingWeHaveAllPieces  )  [inline]
 

Definition at line 665 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testWeAreSeederIfItHaveAllPieces  )  [inline]
 

Definition at line 642 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testWeAreSnubbedIfPeerIsUnchokedButDoesNotReciprocate  )  [inline]
 

A peer considers itself snubbed if it does not get a Piece for a while.

If we are not unchoked we cannot get snubbed.

Note:
when areWeSnubbed() is queried, session will check whether the timeout has elapsed. The timout is reset only after a Piece packet is sent or received and that has already been tested as part of the Speed tests.

Definition at line 528 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testWeGetChoked  )  [inline]
 

Definition at line 325 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testWeGetInterested  )  [inline]
 

Definition at line 363 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testWeGetInterestedAndThenNotInterestedAgain  )  [inline]
 

Definition at line 375 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testWeGetNotInterested  )  [inline]
 

Definition at line 369 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testWeGetUnchoked  )  [inline]
 

Definition at line 332 of file TransferSessionImplTest.cpp.

void Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::testWeGetUnchokedAndThenChokedAgain  )  [inline]
 

Definition at line 338 of file TransferSessionImplTest.cpp.


Member Data Documentation

const QBitArray Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::allPiecesAvailable [private]
 

Definition at line 108 of file TransferSessionImplTest.cpp.

const int Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::AverageLength = 20 [static, private]
 

Definition at line 84 of file TransferSessionImplTest.cpp.

const BadPacket Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::badPacket [private]
 

Definition at line 95 of file TransferSessionImplTest.cpp.

const BitField Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::bitField [private]
 

Definition at line 103 of file TransferSessionImplTest.cpp.

const Choke Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::choke [private]
 

Definition at line 96 of file TransferSessionImplTest.cpp.

auto_ptr<IntegerResetStopwatchMock> Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::downloadStopwatch [private]
 

Definition at line 88 of file TransferSessionImplTest.cpp.

auto_ptr<SessionMock> Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::genericSession [private]
 

Definition at line 87 of file TransferSessionImplTest.cpp.

const Handshake Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::handshake [private]
 

Definition at line 94 of file TransferSessionImplTest.cpp.

const Have Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::have11 [private]
 

Definition at line 107 of file TransferSessionImplTest.cpp.

const Have Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::have5 [private]
 

Definition at line 106 of file TransferSessionImplTest.cpp.

const HaveAll Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::haveAll [private]
 

Definition at line 104 of file TransferSessionImplTest.cpp.

const HaveNone Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::haveNone [private]
 

Definition at line 105 of file TransferSessionImplTest.cpp.

const Interested Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::interested [private]
 

Definition at line 98 of file TransferSessionImplTest.cpp.

const QBitArray Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::noPiecesAvailable [private]
 

Definition at line 110 of file TransferSessionImplTest.cpp.

const NotInterested Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::notInterested [private]
 

Definition at line 99 of file TransferSessionImplTest.cpp.

const Piece Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::piece1 [private]
 

Definition at line 100 of file TransferSessionImplTest.cpp.

const Piece Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::piece2 [private]
 

Definition at line 101 of file TransferSessionImplTest.cpp.

const Piece Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::piece3 [private]
 

Definition at line 102 of file TransferSessionImplTest.cpp.

QBitArray Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::piecesAvailable [private]
 

Definition at line 109 of file TransferSessionImplTest.cpp.

auto_ptr<TransferSessionImplDriver> Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::session [private]
 

Definition at line 92 of file TransferSessionImplTest.cpp.

auto_ptr<TransferSessionImpl> Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::sessionReal [private]
 

Definition at line 91 of file TransferSessionImplTest.cpp.

auto_ptr<TransferSessionStatusMock> Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::sessionStatus [private]
 

Definition at line 90 of file TransferSessionImplTest.cpp.

const int Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::SnubbedTimeout = 60 [static, private]
 

Definition at line 85 of file TransferSessionImplTest.cpp.

const Unchoke Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::unchoke [private]
 

Definition at line 97 of file TransferSessionImplTest.cpp.

auto_ptr<IntegerResetStopwatchMock> Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest::uploadStopwatch [private]
 

Definition at line 89 of file TransferSessionImplTest.cpp.


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