11 #include <gmock/gmock.h>
23 using namespace HCE::reduce::core;
24 using namespace HCE::sphinx::reduce_task;
25 using namespace HCE::sphinx;
31 MOCK_METHOD2(extractWeightKeys,
void(
const Poco::SharedPtr<SphinxResultData> &sphinxResultData,
32 std::vector<std::pair<std::string, unsigned long long> > &extractedWeightKeys));
38 MOCK_METHOD3(build, Poco::SharedPtr<SphinxResultData>(
39 Poco::SharedPtr<SphinxReduceDataStorage> &sphinxDataStorage,
40 const Poco::SharedPtr<HCE::reduce::core::ReduceResultIf> &sphinxReduceResult,
41 const std::vector<SphinxRequestInfo>&
requestInfo));
43 MOCK_METHOD2(buildFromUsingKeys, Poco::SharedPtr<SphinxResultData>(
44 const Poco::SharedPtr<SphinxResultData> &sphinxResultData,
45 std::vector<std::pair<std::string, unsigned long long> > &selectWeightKeys));
51 MOCK_METHOD0(build, Poco::SharedPtr<HCE::reduce::core::ReduceJobIf>());
57 MOCK_METHOD1(build, SharedPtr<SphinxResultDataAccumulatorIf>
58 (SharedPtr<SphinxReduceDataStorage>& dataStorage));
65 MOCK_METHOD0_T(getAllSphinxRequestInfo, std::vector<SphinxRequestInfo>&());
66 MOCK_METHOD0_T(getSphinxDataStorage, Poco::SharedPtr<SphinxReduceDataStorage>());
72 MOCK_METHOD1(findByKey,
73 SharedPtr<SphinxTaskReducerIf>(
unsigned long long taskId));
74 MOCK_METHOD1(deleteByKey,
void(
unsigned long long taskId));
75 MOCK_METHOD2(addWithKey,
void(
unsigned long long taskId,
76 SharedPtr<SphinxTaskReducerIf>&sphinxTaskReducer));
82 MOCK_METHOD0(create, SharedPtr<SphinxTaskReducerIf>());
90 MOCK_METHOD1(convertToSphinxResultDataFrom, SharedPtr<SphinxResultData>(
const string& json));
91 MOCK_METHOD1(convertToJSONFrom,
string(
const SharedPtr<SphinxResultData>& sphinxResultData));
100 MOCK_METHOD0(getResult, SharedPtr<SphinxResultData>());
106 MOCK_METHOD1(sortByWeight,
void(
107 std::vector<std::pair<std::string, unsigned long long> > &weightDocIds));
113 MOCK_METHOD1(trancate, SharedPtr<SphinxResultData>(SharedPtr<SphinxResultData>& sphinxResultData));