void MetalinkEditorTest::testLoadTorrent3() { // Setup wxString filename = get_testfile(wxT("test2.metalink")); MetalinkEditor editor; // Exercise editor.open(filename); // Verify CPPUNIT_ASSERT_EQUAL(1, editor.num_files()); MetalinkFile file = editor.get_file(); CPPUNIT_ASSERT(file.get_filename() == wxT("test55")); CPPUNIT_ASSERT(file.get_sources().size() == 1); MetalinkSource src = file.get_sources().at(0); CPPUNIT_ASSERT(src.get_uri() == wxT("http://torrent.com/test.torrent")); CPPUNIT_ASSERT(src.get_priority() == 23); CPPUNIT_ASSERT(src.get_location().empty()); CPPUNIT_ASSERT(src.is_torrent()); }