From db1e2f066393af3e58814417de5bbe7ea08a145d Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 31 Dec 2015 04:04:31 +0000 Subject: Basics working, could do with a tidy up around mocking --- libmysqlpp/unittests/testmysqle.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'libmysqlpp/unittests/testmysqle.cpp') 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 - #include #include @@ -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(); -- cgit v1.2.3