1 /* $Id: test_filter_sru_to_z3950.cpp,v 1.1 2006-09-28 10:38:00 marc Exp $
2 Copyright (c) 2005-2006, Index Data.
4 See the LICENSE file for details
8 #include "filter_sru_to_z3950.hpp"
10 #include "sru_util.hpp"
11 #include "router_chain.hpp"
12 #include "session.hpp"
13 #include "package.hpp"
18 #define BOOST_AUTO_TEST_MAIN
19 #include <boost/test/auto_unit_test.hpp>
21 using namespace boost::unit_test;
23 namespace mp = metaproxy_1;
24 using namespace mp::util;
28 BOOST_AUTO_UNIT_TEST( test_filter_sru_to_z3950_1 )
32 mp::filter::SRUtoZ3950 f_sru_to_z3950;
39 // BOOST_AUTO_UNIT_TEST( test_filter_sru_to_z3950_2 )
43 // mp::RouterChain router;
45 // mp::filter::SRUtoZ3950 f_sru_to_z3950;
46 // //FilterBounceZ3950 f_bounce_z3950;
48 // router.append(f_sru_to_z3950);
49 // //router.append(f_bounce_z3950);
51 // check_sru_to_z3950_init(router);
52 // check_sru_to_z3950_search(router,
53 // "@attrset Bib-1 @attr 1=4 the",
54 // "@attrset Bib-1 @attr 1=4 the");
58 // BOOST_CHECK (false);
63 // BOOST_AUTO_UNIT_TEST( test_filter_sru_to_z3950_3 )
69 // mp::RouterChain router;
72 // std::string xmlconf =
73 // "<?xml version='1.0'?>\n"
74 // "<filter xmlns='http://indexdata.dk/yp2/config/1'\n"
75 // " id='qrw1' type='sru_to_z3950'>\n"
79 // //std::cout << xmlconf << std::endl;
81 // // reading and parsing XML conf
82 // xmlDocPtr doc = xmlParseMemory(xmlconf.c_str(), xmlconf.size());
84 // xmlNode *root_element = xmlDocGetRootElement(doc);
86 // // creating and configuring filter
87 // mp::filter::SRUtoZ3950 f_sru_to_z3950;
88 // f_sru_to_z3950.configure(root_element);
90 // // remeber to free XML DOM
93 // // add only filter to router
94 // router.append(f_sru_to_z3950);
97 // check_sru_to_z3950_init(router);
98 // check_sru_to_z3950_search(router,
99 // "@attrset Bib-1 @attr 1=4 the",
100 // "@attrset Bib-1 @attr 1=4 the");
104 // catch (std::exception &e) {
105 // std::cout << e.what() << "\n";
106 // BOOST_CHECK (false);
110 // BOOST_CHECK (false);
117 * indent-tabs-mode: nil
118 * c-file-style: "stroustrup"
120 * vim: shiftwidth=4 tabstop=8 expandtab