X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;f=src%2Ftest_filter_frontend_net.cpp;h=9969b21911ebc6bb50df50e05f2a30112df57371;hb=7467b072bb64f5c8575daa9917cce7df62d832f1;hp=9b74cd355f265fc97e5b7ab560757a1683d7e444;hpb=b84218609efb976d5b5270bd9e95a3c421af3a13;p=metaproxy-moved-to-github.git diff --git a/src/test_filter_frontend_net.cpp b/src/test_filter_frontend_net.cpp index 9b74cd3..9969b21 100644 --- a/src/test_filter_frontend_net.cpp +++ b/src/test_filter_frontend_net.cpp @@ -1,3 +1,8 @@ +/* $Id: test_filter_frontend_net.cpp,v 1.11 2005-10-29 22:23:36 marc Exp $ + Copyright (c) 2005, Index Data. + +%LICENSE% + */ #include "config.hpp" #include @@ -5,7 +10,7 @@ #include "filter_frontend_net.hpp" -#include "router.hpp" +#include "router_chain.hpp" #include "session.hpp" #include "package.hpp" @@ -17,7 +22,7 @@ using namespace boost::unit_test; class FilterInit: public yp2::filter::Base { public: void process(yp2::Package & package) const { - + if (package.session().is_closed()) { // std::cout << "Got Close.\n"; @@ -37,6 +42,9 @@ public: } return package.move(); }; + const std::string type() const { + return "FilterInit"; + }; }; @@ -62,7 +70,7 @@ BOOST_AUTO_TEST_CASE( test_filter_frontend_net_2 ) FilterInit tf; - router.rule(tf); + router.append(tf); // Create package with Z39.50 init request in it yp2::Package pack; @@ -107,11 +115,11 @@ BOOST_AUTO_TEST_CASE( test_filter_frontend_net_3 ) ports.insert(ports.begin(), "unix:socket"); filter_front.ports() = ports; filter_front.listen_duration() = 1; // listen a short time only - router.rule(filter_front); + router.append(filter_front); // put in a backend FilterInit filter_init; - router.rule(filter_init); + router.append(filter_init); yp2::Package pack; @@ -128,6 +136,7 @@ BOOST_AUTO_TEST_CASE( test_filter_frontend_net_3 ) * Local variables: * c-basic-offset: 4 * indent-tabs-mode: nil + * c-file-style: "stroustrup" * End: * vim: shiftwidth=4 tabstop=8 expandtab */