Mercurial > malikania
view tests/libserver/dao-account/main.cpp @ 107:6f4965c26ceb
Server: add basic accounts tests, #682
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 05 Sep 2017 13:33:57 +0200 |
parents | f8c6d2244795 |
children |
line wrap: on
line source
/* * main.cpp -- test account_dao * * Copyright (c) 2013-2016 David Demelier <markand@malikania.fr> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #define BOOST_TEST_MODULE "account_dao" #include <boost/test/unit_test.hpp> #include <malikania/server/db/dynlib_database.hpp> #include <malikania/server/db/account_dao.hpp> #include <malikania/server/db/account.hpp> namespace mlk { namespace server { class fixture { protected: std::shared_ptr<dynlib_database> db_; fixture() : db_(new dynlib_database()) { } }; BOOST_FIXTURE_TEST_SUITE(account_dao_suite, fixture) BOOST_AUTO_TEST_CASE(save) { auto ac = std::make_shared<account>("francis", nullptr); } BOOST_AUTO_TEST_SUITE_END() } // !server } // !mlk