14 #define BOOST_TEST_DYN_LINK
15 #define BOOST_TEST_MAIN
16 #define BOOST_TEST_MODULE EventQueueManagementTest
17 #include <boost/test/unit_test.hpp>
19 #include <stdair/stdair_basic_types.hpp>
20 #include <stdair/basic/BasLogParams.hpp>
21 #include <stdair/basic/BasDBParams.hpp>
22 #include <stdair/basic/BasFileMgr.hpp>
23 #include <stdair/basic/ProgressStatusSet.hpp>
24 #include <stdair/bom/EventStruct.hpp>
25 #include <stdair/bom/EventQueue.hpp>
26 #include <stdair/bom/BookingRequestStruct.hpp>
27 #include <stdair/service/Logger.hpp>
32 namespace boost_utf = boost::unit_test;
35 std::ofstream utfReportStream (
"EventQueueManagementTestSuite_utfresults.xml");
40 struct UnitTestConfig {
43 boost_utf::unit_test_log.set_stream (utfReportStream);
44 boost_utf::unit_test_log.set_format (boost_utf::XML);
45 boost_utf::unit_test_log.set_threshold_level (boost_utf::log_test_units);
55 typedef std::pair<stdair::Count_T, stdair::Count_T> NbOfEventsPair_T;
56 typedef std::map<
const stdair::DemandStreamKeyStr_T,
57 NbOfEventsPair_T> NbOfEventsByDemandStreamMap_T;
63 BOOST_GLOBAL_FIXTURE (UnitTestConfig);
66 BOOST_AUTO_TEST_SUITE (master_test_suite)
71 BOOST_AUTO_TEST_CASE (sevmgr_simple_simulation_test) {
77 const bool doesExistAndIsReadable =
78 stdair::BasFileMgr::doesExistAndIsReadable (lInputFilename);
79 BOOST_CHECK_MESSAGE (doesExistAndIsReadable ==
true,
80 "The '" << lInputFilename
81 <<
"' input file can not be open and read");
84 const stdair::Filename_T lLogFilename (
"EventQueueManagementTestSuite.log");
87 std::ofstream logOutputFile;
89 logOutputFile.open (lLogFilename.c_str());
90 logOutputFile.clear();
93 const stdair::BasLogParams lLogParams (stdair::LOG::DEBUG, logOutputFile);
97 sevmgrService.buildSampleBom();
101 sevmgrService.reset();
104 STDAIR_LOG_DEBUG (
"End of the simulation");
107 logOutputFile.close();
111 BOOST_AUTO_TEST_SUITE_END()