/test/mocks/mockRestClientAdapter.h

https://github.com/deltaforge/nebu-common-cpp · C Header · 27 lines · 21 code · 6 blank · 0 comment · 0 complexity · e99d556f309562d11fa1452a9b825d34 MD5 · raw file

  1. #ifndef NEBUTEST_MOCKRESTCLIENTADAPTER_H_
  2. #define NEBUTEST_MOCKRESTCLIENTADAPTER_H_
  3. #include "gmock/gmock.h"
  4. #include "nebu/restClientAdapter.h"
  5. namespace nebu
  6. {
  7. namespace test
  8. {
  9. class MockRestClientAdapter : public nebu::common::RestClientAdapter
  10. {
  11. public:
  12. MOCK_CONST_METHOD1(get, RestClient::response(const std::string& url));
  13. MOCK_CONST_METHOD3(post, RestClient::response(const std::string& url,
  14. const std::string& ctype, const std::string& data));
  15. MOCK_CONST_METHOD3(put, RestClient::response(const std::string& url,
  16. const std::string& ctype, const std::string& data));
  17. MOCK_CONST_METHOD1(del, RestClient::response(const std::string& url));
  18. };
  19. }
  20. }
  21. #endif