diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-12-31 04:04:31 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2017-05-04 20:44:40 +0100 |
commit | db1e2f066393af3e58814417de5bbe7ea08a145d (patch) | |
tree | 9d01e48d8ef7d63fbcca6aced2461b3f1e234dfd /libmysqlpp/unittests/testmysqle.cpp | |
parent | Beginnings of embbeded MySQL (diff) | |
download | libdbpp-mysql-db1e2f066393af3e58814417de5bbe7ea08a145d.tar.bz2 libdbpp-mysql-db1e2f066393af3e58814417de5bbe7ea08a145d.tar.xz libdbpp-mysql-db1e2f066393af3e58814417de5bbe7ea08a145d.zip |
Basics working, could do with a tidy up around mocking
Diffstat (limited to 'libmysqlpp/unittests/testmysqle.cpp')
-rw-r--r-- | libmysqlpp/unittests/testmysqle.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/libmysqlpp/unittests/testmysqle.cpp b/libmysqlpp/unittests/testmysqle.cpp index 0d1defb..659433b 100644 --- a/libmysqlpp/unittests/testmysqle.cpp +++ b/libmysqlpp/unittests/testmysqle.cpp @@ -1,6 +1,3 @@ -#define BOOST_TEST_MODULE TestEmbeddedMySQL -#include <boost/test/unit_test.hpp> - #include <embeddedmy-mock.h> #include <definedDirs.h> @@ -12,5 +9,18 @@ class StandardMockDatabase : public MySQL::Embedded::Mock { } }; -#include "testMain.cpp" +#define BOOST_TEST_MODULE TestEmbeddedMySQL + +#include "test.impl.h" +BOOST_GLOBAL_FIXTURE( StandardMockDatabase ); + +BOOST_FIXTURE_TEST_SUITE( Core, DB::TestCore ); + +BOOST_AUTO_TEST_CASE( bulkload ) +{ + auto ro = DB::ConnectionPtr(DB::MockDatabase::openConnectionTo("mysqlmock")); + BOOST_REQUIRE_THROW(ro->beginBulkUpload("any", nullptr), DB::BulkUploadNotSupported); +} + +BOOST_AUTO_TEST_SUITE_END(); |