From 435f10040f68d02c023b3ad2d6dbfc6e964e20e7 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 1 Jan 2017 21:59:08 +0000 Subject: Use connection plugin resolver for mock providers --- libdbpp/mockDatabase.cpp | 1 + libdbpp/unittests/testMock.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libdbpp/mockDatabase.cpp b/libdbpp/mockDatabase.cpp index 15bfe12..5e78ca1 100644 --- a/libdbpp/mockDatabase.cpp +++ b/libdbpp/mockDatabase.cpp @@ -18,6 +18,7 @@ namespace AdHoc { } INSTANTIATEPLUGINOF(DB::MockDatabase); INSTANTIATEFACTORY(DB::MockDatabase, const std::string &, const std::string &, const std::vector &); +PLUGINRESOLVER(DB::MockDatabaseFactory, DB::Connection::resolvePlugin); namespace DB { diff --git a/libdbpp/unittests/testMock.cpp b/libdbpp/unittests/testMock.cpp index add0720..9a3eba6 100644 --- a/libdbpp/unittests/testMock.cpp +++ b/libdbpp/unittests/testMock.cpp @@ -11,7 +11,7 @@ BOOST_AUTO_TEST_CASE( noFactory ) { BOOST_REQUIRE_THROW({ DB::MockDatabaseFactory::get("not-found"); - }, AdHoc::NoSuchPluginException); + }, AdHoc::LoadLibraryException); } BOOST_AUTO_TEST_CASE( mockFactory ) -- cgit v1.2.3