generated from Sithas/conan_template
36 lines
787 B
C++
36 lines
787 B
C++
#include "AuthRegistrationExecutorTestFixture.h"
|
|
|
|
#include <boost/test/unit_test.hpp>
|
|
#include <boost/beast.hpp>
|
|
|
|
#include <memory>
|
|
|
|
#include "./../../src/db/mysql_connector.h"
|
|
|
|
using namespace std;
|
|
|
|
namespace uad
|
|
{
|
|
F::F() :
|
|
argv(boost::unit_test::framework::master_test_suite().argv),
|
|
mysql_credentials(argv[1]),
|
|
mysql_session(new mysqlx::Session(mysql_credentials))
|
|
{
|
|
uad::SetMySqlSession(mysql_session);
|
|
|
|
user_dao = make_shared<MySQLUserDAO>(GetMySqlSession());
|
|
executor = make_unique<RouteAuthRegistrationExecutor>(GetMySqlSession(), user_dao);
|
|
BOOST_TEST_MESSAGE("setup fixture");
|
|
}
|
|
|
|
F::~F()
|
|
{
|
|
SetMySqlSession(nullptr);
|
|
delete mysql_session;
|
|
mysql_session = nullptr;
|
|
mysql_credentials = nullptr;
|
|
argv = nullptr;
|
|
BOOST_TEST_MESSAGE("teardown fixture");
|
|
}
|
|
}
|