21test_control_api_plugin::test_control_api_plugin(){}
34#define CALL_WITH_API_400(api_name, api_handle, api_namespace, call_name, http_response_code, params_type) \
35{std::string("/v1/" #api_name "/" #call_name), \
36 [api_handle](string, string body, url_response_callback cb) mutable { \
38 auto params = parse_params<api_namespace::call_name ## _params, params_type>(body);\
39 fc::variant result( api_handle.call_name( std::move(params) ) ); \
40 cb(http_response_code, std::move(result)); \
42 http_plugin::handle_exception(#api_name, #call_name, body, cb); \
46#define TEST_CONTROL_RW_CALL(call_name, http_response_code, params_type) CALL_WITH_API_400(test_control, rw_api, test_control_apis::read_write, call_name, http_response_code, params_type)
abstract_plugin & get_plugin(const string &name) const
static string to_string(const variant &v, const yield_function_t &yield, const output_formatting format=output_formatting::stringify_large_ints_and_doubles)
test_control_api_plugin_impl(controller &db)
virtual ~test_control_api_plugin()
virtual void set_program_options(options_description &, options_description &) override
void plugin_initialize(const variables_map &)
#define T(meth, val, expected)
std::string operator()(const T &v) const
#define TEST_CONTROL_RW_CALL(call_name, http_response_code, params_type)