#ifndef MOCK_TRANSPORT_HH #define MOCK_TRANSPORT_HH #include "transport.hh" #include class MockTransport : public Transport { public: std::unique_ptr create_data(uint16_t code, std::string data) override { return std::unique_ptr(create_data_proxy(code, std::move(data))); } MOCK_METHOD(std::unique_ptr, create_file, (uint16_t, std::filesystem::path), (override)); MOCK_METHOD(std::unique_ptr, create_exif_thumbnail, (uint16_t, std::filesystem::path), (override)); MOCK_METHOD(void, add_client, (unique_fd&&), (override)); MOCK_METHOD(Response*, create_data_proxy, (uint16_t, std::string)); }; class MockResponse : public Transport::Response { public: MOCK_METHOD(uint16_t, code, (), (override, const)); MOCK_METHOD((std::vector> const&), headers, (), (override, const)); MOCK_METHOD(std::unique_ptr, open_content, (), (override)); MOCK_METHOD(void, open_content_async, ( std::shared_ptr, std::function)>), (override)); MOCK_METHOD(void, add_header, (std::string, std::string), (override)); }; #endif // MOCK_TRANSPORT_HH