#ifndef example_diameter_launcher_EventOperation_hpp
#define example_diameter_launcher_EventOperation_hpp
-// Project
-
// STL
#include <string>
-//// Standard
-//#include <sstream> // std::istringstream
-//#include <iostream> // std::cout
-//#include <math.h> // ceil
-//#include <climits>
-//#include <unistd.h> // chdir
-//#include <stdio.h>
-//
// Project
-//#include <anna/timex/Engine.hpp>
-//#include <anna/statistics/Engine.hpp>
-//#include <anna/diameter/codec/functions.hpp>
-//#include <anna/diameter/codec/Engine.hpp>
-//#include <anna/diameter/codec/EngineManager.hpp>
-//#include <anna/http/Transport.hpp>
-//#include <anna/diameter/stack/Engine.hpp>
-//#include <anna/diameter/helpers/base/functions.hpp>
-//#include <anna/time/functions.hpp>
-//#include <anna/diameter.comm/ApplicationMessageOamModule.hpp>
-//#include <anna/testing/defines.hpp>
-//#include <anna/xml/xml.hpp>
-//#include <anna/diameter.comm/OriginHost.hpp>
-//#include <anna/diameter.comm/OriginHostManager.hpp>
-//
-//// Process
-//#include <Launcher.hpp>
-//#include <Procedure.hpp>
-//#include <EventOperation.hpp>
-//#include <MyDiameterEngine.hpp>
-//#include <anna/testing/TestManager.hpp>
-//#include <anna/testing/TestCase.hpp>
+#include <anna/json/json.hpp>
class EventOperation {
bool test_id__description(std::string &response, unsigned int id, const std::string & description);
bool test_id__ip_limit(std::string &response, unsigned int id, int amount = 1);
bool test_id__timeout(std::string &response, unsigned int id, int msecs);
- bool test_id__sendmsg2e(std::string &response, unsigned int id, const std::string & diameterJson, int stepNumber = -1);
- bool test_id__sendmsg2c(std::string &response, unsigned int id, const std::string & diameterJson, int stepNumber = -1);
+ bool test_id__sendmsg2e_2c(std::string &response, unsigned int id, bool _2e_or_2c, const std::string & diameterJson, int stepNumber = -1);
bool test_id__delay(std::string &response, unsigned int id, int msecs);
bool test_id__sh_command(std::string &response, unsigned int id, const std::string & script);
- bool test_id__waitfe_hex(std::string &response, unsigned int id, const std::string & hex, bool strict = false);
- bool test_id__waitfc_hex(std::string &response, unsigned int id, const std::string & hex, bool strict = false);
- bool test_id__waitfe_msg(std::string &response, unsigned int id, const std::string & diameterJson, bool strict = false);
- bool test_id__waitfc_msg(std::string &response, unsigned int id, const std::string & diameterJson, bool strict = false);
- bool test_id__waitfe(std::string &response, unsigned int id, const std::string & condition);
- bool test_id__waitfc(std::string &response, unsigned int id, const std::string & condition);
+ bool test_id__waitfefc_hex(std::string &response, unsigned int id, bool fe_or_fc, const std::string & hex, bool strict = false);
+ bool test_id__waitfefc_msg(std::string &response, unsigned int id, bool fe_or_fc, const std::string & diameterJson, bool strict = false);
+ bool test_id__waitfefc(std::string &response, unsigned int id, bool fe_or_fc,
+ const std::string & code,
+ const std::string & bitR,
+ const std::string & hopByHop,
+ const std::string & applicationId,
+ const std::string & sessionId,
+ const std::string & resultCode,
+ const std::string & msisdn,
+ const std::string & imsi,
+ const std::string & serviceContextId);
// Testcases execution
// test__<command>
bool test__look(std::string &response, int id = -1 /* current */);
bool test__state(std::string &response, int id = -1 /* current */);
bool test__interact(std::string &response, int amount, unsigned int id = -1 /* current */);
- bool test__reset(std::string &response, bool soft_hard = true, unsigned int id = -2 /* apply to all the tests */);
+ bool test__reset(std::string &response, bool soft_hard = true, int id = -1 /* apply to all the tests */);
bool test__repeats(std::string &response, int amount);
bool test__auto_reset(std::string &response, bool soft_hard);
bool test__initialized(std::string &response);
const std::string & state = "all" /* initialized|in-progress|failed|success|[all]|none */, bool enable = true);
bool test__report_hex(std::string &response, bool enable = true);
bool test__dump_stdout(std::string &response, bool enable = true);
+
+ // Dynamic procedure
+ bool test__dynamic(std::string &response, const nlohmann::json &arguments);
};
#endif