fileman_mock.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #ifndef FILEMAN_MOCK_H
  2. #define FILEMAN_MOCK_H
  3. #include "../include/fileman.h"
  4. #include <gmock/gmock.h>
  5. class FileManMock : public FileMan {
  6. public:
  7. MOCK_METHOD(bool, isGetting, (), (override));
  8. MOCK_METHOD(bool, isPutting, (), (override));
  9. MOCK_METHOD(bool, isListing, (), (override));
  10. MOCK_METHOD(bool, openPut, (const std::string &path), (override));
  11. MOCK_METHOD(bool, openGet, (const std::string &path), (override));
  12. MOCK_METHOD(bool, openList, (), (override));
  13. MOCK_METHOD(void, closePut, (), (override));
  14. MOCK_METHOD(void, closeGet, (), (override));
  15. MOCK_METHOD(void, closeList, (), (override));
  16. MOCK_METHOD(std::string, getPutName, (), (override));
  17. MOCK_METHOD(std::string, getGetName, (), (override));
  18. MOCK_METHOD(void, cancelPut, (), (override));
  19. MOCK_METHOD(void, cancelGet, (), (override));
  20. MOCK_METHOD(void, cancelList, (), (override));
  21. MOCK_METHOD(std::vector<char>, readPut, (), (override));
  22. MOCK_METHOD(void, writeGet, (std::vector<char> data), (override));
  23. MOCK_METHOD(std::string, readBase64, (), (override));
  24. MOCK_METHOD(void, writeBase64, (std::string data), (override));
  25. MOCK_METHOD(void, putListData, (std::vector<std::string> names), (override));
  26. MOCK_METHOD(std::vector<std::string>, getListData, (), (override));
  27. MOCK_METHOD(int, getPutChunks, (), (override));
  28. MOCK_METHOD(int, getGetChunks, (), (override));
  29. MOCK_METHOD(int, getListChunks, (), (override));
  30. MOCK_METHOD(int, getPutRemainingChunks, (), (override));
  31. MOCK_METHOD(int, getGetRemainingChunks, (), (override));
  32. MOCK_METHOD(int, getListRemainingChunks, (), (override));
  33. MOCK_METHOD(int, getPutSize, (), (override));
  34. MOCK_METHOD(void, setGetChunks, (int chunks), (override));
  35. MOCK_METHOD(void, setListChunks, (int chunks), (override));
  36. MOCK_METHOD(std::string, pathToFilename, (std::string path), (override));
  37. MOCK_METHOD(std::string, getOpensslError, (), (override));
  38. MOCK_METHOD(bool, openKey, (const std::string &path), (override));
  39. MOCK_METHOD(bool, closeKey, (), (override));
  40. };
  41. #endif