hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
CoreMocks.hpp
Go to the documentation of this file.
1 /*
2  * Mocks.h
3  *
4  * Created on: Apr 2, 2013
5  * Author: igor
6  */
7 
8 #ifndef CORE_MOCKS_H_
9 #define CORE_MOCKS_H_
10 #include <gmock/gmock.h>
11 #include "ReduceTaskCore.hpp"
12 
13 using namespace HCE::reduce::core;
14 
15 class IterableMock: public virtual IterableIf{
16 public:
17  MOCK_METHOD0(hasNext, bool());
18  MOCK_METHOD0(reset, void());
19  MOCK_METHOD2(getNext, void(std::string &key, std::string &value));;
20 };
21 
22 class StorableMock: public virtual StorableIf{
23 public:
24  MOCK_METHOD2(addKeyValue, void (const std::string &key, const std::string &value));
25 };
26 
27 
29 };
30 
32 public:
33  MOCK_METHOD1(fillReduceResult, void (Poco::SharedPtr<ReduceResultIf> reduceResult));
34 };
35 
36 
37 class ReduceJobMock: public ReduceJobIf{
38 public:
39  MOCK_CONST_METHOD0(getDataStorage, Poco::SharedPtr<IterableIf>());
40  MOCK_CONST_METHOD0(getReduceResult, Poco::SharedPtr<ReduceResultIf>());
41  MOCK_CONST_METHOD0(getReduceTask, Poco::SharedPtr<ReduceTaskIf>());
42 };
43 
44 
46 public:
47  MOCK_METHOD1(executeJob, void(const Poco::SharedPtr<ReduceJobIf> &reduceJob));
48 };
49 
50 #endif /* MOCKS_H_ */
51