*/
#include <sstream>
#include <fstream>
#include <string>
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MAIN
#define BOOST_TEST_MODULE SearchingTestSuite
#include <boost/test/unit_test.hpp>
namespace boost_utf = boost::unit_test;
#if defined(BOOST_VERSION) && BOOST_VERSION >= 105900
boost_utf::unit_test_log.set_format (boost_utf::OF_XML);
#else // BOOST_VERSION
boost_utf::unit_test_log.set_format (boost_utf::XML);
#endif // BOOST_VERSION
boost_utf::unit_test_log.set_threshold_level (boost_utf::log_test_units);
}
}
};
BOOST_AUTO_TEST_SUITE (master_test_suite)
std::string lLogFilename ("SearchingTestSuite.log");
std::string lTravelQuery ("nce");
std::ofstream logOutputFile;
logOutputFile.open (lLogFilename.c_str());
logOutputFile.clear();
lDBType, lSQLDBConnStr,
lDeploymentNumber);
opentrepService.interpretTravelRequest (lTravelQuery, lLocationList,
lNonMatchedWordList);
BOOST_CHECK_MESSAGE (nbOfMatches == 1,
"The travel query ('" << lTravelQuery
<< "') matches with " << nbOfMatches
<< " key-words, whereas 1 is expected.");
logOutputFile.close();
}
BOOST_AUTO_TEST_SUITE_END()