std::string type() function taken out of all filter classes again
[metaproxy-moved-to-github.git] / src / test_router_flexml.cpp
1 /* $Id: test_router_flexml.cpp,v 1.3 2005-10-31 09:40:18 marc Exp $
2    Copyright (c) 2005, Index Data.
3
4 %LICENSE%
5  */
6
7 #include "config.hpp"
8 #include <iostream>
9 #include <stdexcept>
10
11 #include "filter.hpp"
12 #include "router_flexml.hpp"
13
14 #define BOOST_AUTO_TEST_MAIN
15 #include <boost/test/auto_unit_test.hpp>
16
17 using namespace boost::unit_test;
18
19 class TFilter: public yp2::filter::Base {
20 public:
21     void process(yp2::Package & package) const {};
22 };
23     
24
25 BOOST_AUTO_TEST_CASE( test_router_flexml_1 )
26 {
27     try{
28         TFilter filter;
29
30         std::string xmlconf = "<?xml version=\"1.0\"?>"
31             "<yp2 xmlns=\"http://indexdata.dk/yp2/config/1\">"
32             "<start route=\"start\"/>"
33             "<filters>"
34             "<filter id=\"front_default\" type=\"frontend-net\">"
35             "<port>210</port>"
36             "</filter>"
37             "<filter id=\"log_cout\" type=\"log\">"
38             "<logfile>mylog.log</logfile>"
39             "</filter>"
40             "</filters>"
41             "<routes>"  
42             "<route id=\"start\">"
43             "<filter refid=\"front_default\"/>"
44             "<filter refid=\"log_cout\"/>"
45             "</route>"
46             "</routes>"
47             "</yp2>";
48         
49         yp2::RouterFleXML rflexml(xmlconf);
50         
51
52         BOOST_CHECK (true);
53
54         //BOOST_CHECK_EQUAL(filter.name(), std::string("filter1"));
55         
56     }
57     catch ( ... ) {
58         BOOST_CHECK (false);
59     }
60 }
61
62 /*
63  * Local variables:
64  * c-basic-offset: 4
65  * indent-tabs-mode: nil
66  * c-file-style: "stroustrup"
67  * End:
68  * vim: shiftwidth=4 tabstop=8 expandtab
69  */