#pragma once // Test client: drives the real Application (routing, middleware, views, DI, // error mapping, in-memory DB) without sockets, plus a cookie jar and frozen // time hook. Gap: real test client in 08-clients-openapi.md owns fixtures, // DB resets, and time freezing. #include #include #include #include "App.hpp" namespace molo::example::fw { class TestClient { public: explicit TestClient(std::shared_ptr app); Response get(const std::string& path); Response post(const std::string& path, const std::string& body = "", const std::string& content_type = "text/plain"); Response request(Method method, const std::string& path, const std::string& body = "", const std::map& headers = {}); void freeze_time(const std::string& iso); const std::string& frozen_time() const; void clear_cookies(); private: std::shared_ptr app_; std::map jar_; std::string frozen_time_; }; } // namespace molo::example::fw