Mock HTTP client for testing network interactions
| 15 | |
| 16 | // Mock HTTP client for testing network interactions |
| 17 | class MockHTTPClient { |
| 18 | public: |
| 19 | // Using simple function signatures to avoid GMock template issues |
| 20 | virtual ~MockHTTPClient() = default; |
| 21 | virtual bool post(const std::string& url, |
| 22 | const std::map<std::string, std::string>& headers, |
| 23 | const std::string& body, |
| 24 | std::string& response_body, |
| 25 | int& status_code) = 0; |
| 26 | |
| 27 | virtual bool stream_post( |
| 28 | const std::string& url, |
| 29 | const std::map<std::string, std::string>& headers, |
| 30 | const std::string& body, |
| 31 | const std::function<void(const std::string&)>& callback) = 0; |
| 32 | }; |
| 33 | |
| 34 | // Controllable OpenAI client for testing |
| 35 | class ControllableOpenAIClient { |
nothing calls this directly
no outgoing calls
no test coverage detected