#include "DefaultBtMessageDispatcher.h" #include #include #include "Util.h" #include "Exception.h" #include "MockPieceStorage.h" #include "MockPeerStorage.h" #include "DefaultBtContext.h" #include "MockBtMessage.h" #include "MockBtMessageFactory.h" #include "prefs.h" #include "BtCancelSendingPieceEvent.h" #include "BtHandshakeMessage.h" #include "Option.h" #include "RequestGroupMan.h" #include "ServerStatMan.h" #include "RequestGroup.h" namespace aria2 { class DefaultBtMessageDispatcherTest:public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(DefaultBtMessageDispatcherTest); CPPUNIT_TEST(testAddMessage); CPPUNIT_TEST(testSendMessages); CPPUNIT_TEST(testSendMessages_underUploadLimit); // See the comment on the definition //CPPUNIT_TEST(testSendMessages_overUploadLimit); CPPUNIT_TEST(testSendMessages_sendingInProgress); CPPUNIT_TEST(testDoCancelSendingPieceAction); CPPUNIT_TEST(testCheckRequestSlotAndDoNecessaryThing); CPPUNIT_TEST(testCheckRequestSlotAndDoNecessaryThing_timeout); CPPUNIT_TEST(testCheckRequestSlotAndDoNecessaryThing_completeBlock); CPPUNIT_TEST(testIsSendingInProgress); CPPUNIT_TEST(testCountOutstandingRequest); CPPUNIT_TEST(testIsOutstandingRequest); CPPUNIT_TEST(testGetOutstandingRequest); CPPUNIT_TEST(testRemoveOutstandingRequest); CPPUNIT_TEST_SUITE_END(); private: SharedHandle btContext; SharedHandle peer; SharedHandle btMessageDispatcher; SharedHandle peerStorage; SharedHandle pieceStorage; SharedHandle _messageFactory; SharedHandle _rgman; SharedHandle