+ yp2::FilterFactory factory;
+ yp2::RouterFleXML rflexml(xmlconf_invalid, factory);
+ }
+ catch ( yp2::RouterFleXML::XMLError &e) {
+ got_xml_error = true;
+ }
+ catch ( std::runtime_error &e) {
+ std::cout << "std::runtime error: " << e.what() << "\n";
+ BOOST_CHECK (false);
+ }
+ catch ( ... ) {
+ ;
+ }
+ BOOST_CHECK(got_xml_error);
+}
+
+BOOST_AUTO_UNIT_TEST( test_router_flexml_3 )
+{
+ try
+ {
+ std::string xmlconf = "<?xml version=\"1.0\"?>\n"
+ "<y:yp2 xmlns:y=\"http://indexdata.dk/yp2/config/1\">\n"
+ " <y:start route=\"start\"/>\n"
+ " <y:filters>\n"
+ " <y:filter id=\"front_default\" type=\"frontend_net\">\n"
+ " <port>210</port>\n"
+ " </y:filter>\n"
+ " <y:filter id=\"log_cout\" type=\"log\">\n"
+ " <logfile>mylog.log</logfile>\n"
+ " </y:filter>\n"
+ " </y:filters>\n"
+ " <y:routes>\n"
+ " <y:route id=\"start\">\n"
+ " <y:filter refid=\"front_default\"/>\n"
+ " <y:filter refid=\"log_cout\"/>\n"
+ " </y:route>\n"
+ " </y:routes>\n"
+ "</y:yp2>\n";
+
+ yp2::FactoryStatic factory;
+ yp2::RouterFleXML rflexml(xmlconf, factory);
+ }
+ catch ( std::runtime_error &e) {
+ std::cout << "std::runtime error: " << e.what() << "\n";
+ BOOST_CHECK (false);