2 #include <boost/test/auto_unit_test.hpp>
6 #include "zypp/PathInfo.h"
7 #include "zypp/base/Easy.h"
8 #include "zypp/media/MediaUserAuth.h"
10 #include "zypp/media/CredentialFileReader.h"
14 using namespace zypp::media;
16 typedef std::set<AuthData_Ptr> CredentialSet;
20 bool collect(AuthData_Ptr & cred)
22 cout << "got: " << endl << *cred << endl;
30 BOOST_AUTO_TEST_CASE(read_cred)
32 CredCollector collector;
33 Pathname credfile = TESTS_SRC_DIR "/media/data/credentials.cat";
34 CredentialFileReader reader(credfile,
35 bind( &CredCollector::collect, &collector, _1 ));
37 BOOST_CHECK(collector.creds.size() == 2);