generated from Sithas/conan_template
31 lines
974 B
C++
31 lines
974 B
C++
#ifdef WIN32
|
|
#include <sdkddkver.h>
|
|
#endif
|
|
|
|
#define BOOST_TEST_MODULE Controllers
|
|
|
|
#include <boost/test/included/unit_test.hpp>
|
|
|
|
#include "./../../src/endpoints_handlers/Controller.h"
|
|
|
|
#include <cstdint>
|
|
#include <cstdlib>
|
|
|
|
using namespace boost;
|
|
using namespace std;
|
|
using namespace uad;
|
|
|
|
BOOST_AUTO_TEST_CASE(Should_Be_Initiated_With_No_Executors)
|
|
{
|
|
Controller<beast::http::string_body,
|
|
std::allocator<char>,
|
|
beast::http::response<beast::http::string_body>> my_controller;
|
|
|
|
BOOST_CHECK(!my_controller.FindExecutor(beast::http::verb::get).has_value());
|
|
BOOST_CHECK(!my_controller.FindExecutor(beast::http::verb::post).has_value());
|
|
BOOST_CHECK(!my_controller.FindExecutor(beast::http::verb::put).has_value());
|
|
BOOST_CHECK(!my_controller.FindExecutor(beast::http::verb::delete_).has_value());
|
|
BOOST_CHECK(!my_controller.FindExecutor(beast::http::verb::head).has_value());
|
|
BOOST_CHECK(!my_controller.FindExecutor(beast::http::verb::options).has_value());
|
|
}
|