38 #include <boost/test/unit_test.hpp>
46 void checkClientFactory(
const std::string& aId,
const std::string& aURI,
const std::vector<std::string>& aUserClientActivationList)
48 BOOST_TEST_MESSAGE(
"Creating client with ID '" << aId <<
"', URI '" << aURI <<
"' (" << aUserClientActivationList.size() <<
" user clients activated)");
49 for(
size_t i=0; i < aUserClientActivationList.size(); i++) {
50 BOOST_TEST_MESSAGE(
" - '" << aUserClientActivationList.at(i) <<
"'");
54 BOOST_REQUIRE(lClient);
64 BOOST_TEST_MESSAGE(
"Creating client with ID '" << aId <<
"', URI '" << aURI <<
"'");
66 BOOST_REQUIRE(lClient);
71 checkClientFactory<T>(aId, aURI, std::vector<std::string>());
75 BOOST_AUTO_TEST_SUITE( client_factory )
80 checkClientFactory<UDP<IPbus<1,3> > >(
"alice",
"ipbusudp-1.3://localhost:50001");
81 checkClientFactory<UDP<IPbus<2,0> > >(
"bob",
"ipbusudp-2.0://localhost:50001");
82 checkClientFactory<TCP<IPbus<1,3>, 1 > >(
"charlie",
"ipbustcp-1.3://localhost:50001");
83 checkClientFactory<TCP<IPbus<2,0>, 1 > >(
"dave",
"ipbustcp-2.0://localhost:50001");
84 checkClientFactory<TCP<ControlHub < IPbus< 1 , 3 > > , 3 > >(
"x",
"chtcp-1.3://localhost:12345?target=localhost:50001");
85 checkClientFactory<TCP<ControlHub < IPbus< 2 , 0 > > , 3 > >(
"y",
"chtcp-2.0://localhost:12345?target=localhost:50001");
86 checkClientFactory<PCIe>(
"z",
"ipbuspcie-2.0:///path1,/path2");
87 checkClientFactory<Mmap>(
"z",
"ipbusmmap-2.0:///path/to/file");
95 checkClientFactory<DummyClient>(
"bob",
"__test__://localhost:50001", std::vector<std::string>(1,
"__test__"));
102 BOOST_AUTO_TEST_SUITE_END()