- rework the testsuite after new boost in factory broke it.
[platform/upstream/libzypp.git] / tests / zypp / Fetcher_test.cc
index 8b0600f..c016eae 100644 (file)
@@ -15,30 +15,12 @@ using namespace zypp;
 using namespace zypp::media;
 using namespace boost::unit_test;
 
-void fetcher_simple_test()
-{
-  string dir(TESTS_SRC_DIR);
-  dir += "/zypp/data/Fetcher/remote-site";
-  MediaSetAccess media( "dir:" + dir, "/" );
-  Fetcher fetcher;
-}
+#define DATADIR (Pathname(TESTS_SRC_DIR) + "/zypp/data/Fetcher/remote-site")
 
-test_suite*
-init_unit_test_suite( int argc, char *argv[] )
+BOOST_AUTO_TEST_CASE(fetcher)
 {
-//   if (argc < 2)
-//   {
-//     cout << "mediasetaccesstest:"
-//       " path to directory with test data required as parameter" << endl;
-//     return (test_suite *)0;
-//   }
-
-  test_suite* test= BOOST_TEST_SUITE("Fetcher_test");
-
-  // simple test
-  test->add(BOOST_TEST_CASE(&fetcher_simple_test));
-
-  return test;
+  MediaSetAccess media( ("dir:" + DATADIR).asUrl(), "/" );
+  Fetcher fetcher;
 }
 
 // vim: set ts=2 sts=2 sw=2 ai et: