#ifndef _TR_TEST_SERVER_CONTEXT_HPP_ #define _TR_TEST_SERVER_CONTEXT_HPP_ #include #include #include #include class TestRequest { public: std::stringstream content; }; class TestResponse : public std::stringstream { public: std::string buffer; std::unordered_map headers_; std::string string(); std::string message(); std::string code(); std::string content(); const std::unordered_map& headers(); }; class CommonResponse { public: static void service_unavailable(std::shared_ptr response); static void ok(std::shared_ptr response, const nlohmann::json &data); static void bad_request(std::shared_ptr response); static void accepted(std::shared_ptr response); static void no_content(std::shared_ptr response); static void created(std::shared_ptr response, std::shared_ptr request, const std::string &location); }; #endif