Imported Upstream version 17.23.5
[platform/upstream/libzypp.git] / tests / repo / PluginServices_test.cc
1 #include <stdio.h>
2 #include <iostream>
3 #include <fstream>
4 #include <vector>
5 #include <list>
6 #include <boost/test/unit_test.hpp>
7
8 #include <zypp/ZYppFactory.h>
9 #include <zypp/Url.h>
10 #include <zypp/PathInfo.h>
11 #include <zypp/TmpPath.h>
12 #include <zypp/ZConfig.h>
13 #include <zypp/repo/PluginServices.h>
14 #include <zypp/ServiceInfo.h>
15
16 using std::cout;
17 using std::endl;
18 using std::string;
19 using namespace zypp;
20 using namespace boost::unit_test;
21 using namespace zypp::repo;
22
23 #define DATADIR (Pathname(TESTS_SRC_DIR) +  "/repo/yum/data")
24
25 class ServiceCollector
26 {
27 public:
28   typedef std::set<ServiceInfo> ServiceSet;
29     
30   ServiceCollector( ServiceSet & services_r )
31     : _services( services_r )
32   {}
33
34   bool operator()( const ServiceInfo & service_r ) const
35   {
36     _services.insert( service_r );
37     return true;
38   }
39
40 private:
41   ServiceSet & _services;
42 };
43
44
45 BOOST_AUTO_TEST_CASE(plugin_services)
46 {
47   ServiceCollector::ServiceSet services;
48     
49   PluginServices local("/space/tmp/services", ServiceCollector(services));
50 }
51
52 // vim: set ts=2 sts=2 sw=2 ai et: