TEST_F(TestDownloadQueue, RequestFile) { IDownloadQueueObserver observer; CDownloadQueue queue; CTestDownloadQueueThread thread; unsigned int count; std::vector<CStdString> urls = CXBMCTestUtils::Instance().getTestDownloadQueueUrls(); std::vector<CStdString>::iterator it; count = 0; for (it = urls.begin(); it < urls.end(); it++) { std::cout << "Testing URL: " << *it << "\n"; TICKET t = queue.RequestFile(*it, &observer); EXPECT_EQ(count, t.dwItemId); count++; } thread.Sleep(1000); queue.Flush(); EXPECT_EQ(0, queue.Size()); }