summaryrefslogtreecommitdiff
path: root/libmysqlpp/embeddedmy-mock.h
diff options
context:
space:
mode:
Diffstat (limited to 'libmysqlpp/embeddedmy-mock.h')
-rw-r--r--libmysqlpp/embeddedmy-mock.h30
1 files changed, 17 insertions, 13 deletions
diff --git a/libmysqlpp/embeddedmy-mock.h b/libmysqlpp/embeddedmy-mock.h
index 0b90b4b..cad10eb 100644
--- a/libmysqlpp/embeddedmy-mock.h
+++ b/libmysqlpp/embeddedmy-mock.h
@@ -4,26 +4,30 @@
#include <mockDatabase.h>
#include <boost/filesystem/path.hpp>
#include <visibility.h>
+#include <boost/shared_ptr.hpp>
+#include "embeddedmy-server.h"
namespace MySQL {
-namespace Embedded {
+ namespace Embedded {
+ class DLL_PUBLIC Mock : public DB::MockDatabase {
+ public:
+ Mock(const std::string & name, const std::vector<boost::filesystem::path> & ss);
+ ~Mock();
-class DLL_PUBLIC Mock : public DB::MockDatabase {
- public:
- Mock(const std::string & name, const std::vector<boost::filesystem::path> & ss);
- ~Mock();
+ protected:
+ void DropDatabase() const override;
+ void CreateNewDatabase() const override;
- protected:
- void DropDatabase() const override;
- void CreateNewDatabase() const override;
+ DB::Connection * openConnection() const override;
- DB::Connection * openConnection() const override;
+ private:
+ static boost::filesystem::path mockDbPath();
- private:
- const boost::filesystem::path testDbPath;
-};
+ std::string dbname;
+ mutable ServerPtr embeddedServer;
+ };
-}
+ }
}
#endif