+ mp::FactoryFilter factory;
+ mp::RouterFleXML rflexml(xmlconf_invalid, factory, true);
+ }
+ catch ( mp::XMLError &e) {
+ std::cout << "XMLError: " << e.what() << "\n";
+ got_error_as_expected = true;
+ }
+ catch ( std::runtime_error &e) {
+ std::cout << "std::runtime error: " << e.what() << "\n";
+ }
+ catch ( ... ) {
+ ;
+ }
+ BOOST_CHECK(got_error_as_expected);
+}
+
+// Pass well-formed XML with explicit NS
+BOOST_AUTO_TEST_CASE( test_router_flexml_3 )
+{
+ try
+ {
+ std::string xmlconf = "<?xml version=\"1.0\"?>\n"
+ "<mp:metaproxy xmlns:mp=\"http://indexdata.com/metaproxy\""
+ " version=\"1.0\">\n"
+ " <mp:start route=\"start\"/>\n"
+ " <mp:filters>\n"
+ " <mp:filter id=\"front_default\" type=\"frontend_net\">\n"
+ " <port>@:210</port>\n"
+ " </mp:filter>\n"
+ " <mp:filter id=\"log_cout\" type=\"log\">\n"
+ " <message>my msg</message>\n"
+ " </mp:filter>\n"
+ " </mp:filters>\n"
+ " <mp:routes>\n"
+ " <mp:route id=\"start\">\n"
+ " <mp:filter refid=\"front_default\"/>\n"
+ " <mp:filter refid=\"log_cout\"/>\n"
+ " </mp:route>\n"
+ " </mp:routes>\n"
+ "</mp:metaproxy>\n";
+
+ mp::FactoryStatic factory;
+ mp::RouterFleXML rflexml(xmlconf, factory, true);
+ }
+ catch ( std::runtime_error &e) {
+ std::cout << "std::runtime error: " << e.what() << "\n";
+ BOOST_CHECK (false);