summaryrefslogtreecommitdiff
path: root/libmysqlpp/unittests/testmysqle.cpp
blob: 659433b5c72da3470b84062b3160ec5971bc9230 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <embeddedmy-mock.h>
#include <definedDirs.h>

class StandardMockDatabase : public MySQL::Embedded::Mock {
	public:
		StandardMockDatabase() : MySQL::Embedded::Mock("mysqlmock", {
				rootDir / "mysqlschema.sql" })
		{
		}
};

#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();