| 32 | CPPUNIT_TEST_SUITE_REGISTRATION(RequestGroupTest); |
| 33 | |
| 34 | void RequestGroupTest::testGetFirstFilePath() |
| 35 | { |
| 36 | std::shared_ptr<DownloadContext> ctx( |
| 37 | new DownloadContext(1_k, 1_k, "/tmp/myfile")); |
| 38 | |
| 39 | RequestGroup group(GroupId::create(), option_); |
| 40 | group.setDownloadContext(ctx); |
| 41 | |
| 42 | CPPUNIT_ASSERT_EQUAL(std::string("/tmp/myfile"), group.getFirstFilePath()); |
| 43 | |
| 44 | group.markInMemoryDownload(); |
| 45 | |
| 46 | CPPUNIT_ASSERT_EQUAL(std::string("[MEMORY]myfile"), group.getFirstFilePath()); |
| 47 | } |
| 48 | |
| 49 | void RequestGroupTest::testTryAutoFileRenaming() |
| 50 | { |
nothing calls this directly
no test coverage detected