| 169 | }; |
| 170 | |
| 171 | class HTTPCacheServer : public HTTPServer |
| 172 | { |
| 173 | public: |
| 174 | using HTTPServer::HTTPServer; |
| 175 | |
| 176 | protected: |
| 177 | std::shared_ptr<TCPSession> CreateSession(const std::shared_ptr<TCPServer>& server) override |
| 178 | { |
| 179 | return std::make_shared<HTTPCacheSession>(std::dynamic_pointer_cast<HTTPServer>(server)); |
| 180 | } |
| 181 | |
| 182 | protected: |
| 183 | void onError(int error, const std::string& category, const std::string& message) override |
| 184 | { |
| 185 | std::cout << "HTTP server caught an error with code " << error << " and category '" << category << "': " << message << std::endl; |
| 186 | FAIL(); |
| 187 | } |
| 188 | }; |
| 189 | |
| 190 | TEST_CASE("HTTP server & client test", "[CppServer][HTTP]") |
| 191 | { |
nothing calls this directly
no outgoing calls
no test coverage detected