#include "zbxmockassert.h"
#include "libs/zbxpreproc/pp_execute.h"
void zbx_mock_test_entry(void **state)
zbx_variant_t value, history_value_in, history_value_out;
zbx_timespec_t ts, history_ts;
xml = zbx_mock_get_parameter_string("in.xml");
exp_xml = zbx_mock_get_parameter_string("out.result");
zbx_variant_set_str(&value, zbx_strdup(NULL, xml));
step.type = ZBX_PREPROC_XPATH;
step.params = (char *)zbx_mock_get_parameter_string("in.xpath");
step.error_handler = ZBX_PREPROC_FAIL_DEFAULT;
zbx_variant_set_none(&history_value_in);
zbx_variant_set_none(&history_value_out);
act_ret = pp_execute_step(&ctx, NULL, NULL, 0, ITEM_VALUE_TYPE_TEXT, &value, ts, &step, &history_value_in,
&history_value_out, &history_ts, get_zbx_config_source_ip());
exp_ret = zbx_mock_str_to_return_code(zbx_mock_get_parameter_string("out.return"));
zbx_mock_assert_int_eq("return value", exp_ret, act_ret);
zbx_mock_assert_int_eq("result variant type", ZBX_VARIANT_ERR, value.type);
zbx_mock_assert_str_eq("result", exp_xml, value.data.str);