diff options
Diffstat (limited to 'libmysqlpp/my-mock.cpp')
-rw-r--r-- | libmysqlpp/my-mock.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libmysqlpp/my-mock.cpp b/libmysqlpp/my-mock.cpp index 2eee416..8cf3057 100644 --- a/libmysqlpp/my-mock.cpp +++ b/libmysqlpp/my-mock.cpp @@ -2,15 +2,22 @@ #include "my-mock.h" #include <compileTimeFormatter.h> +NAMEDFACTORY("mysql", MySQL::Mock, DB::MockDatabaseFactory); + namespace MySQL { -Mock::Mock(const std::string & name, const std::vector<boost::filesystem::path> & ss) : - MockServerDatabase("options=p2testmysql", name, "mysql") +Mock::Mock(const std::string & master, const std::string & name, const std::vector<boost::filesystem::path> & ss) : + MockServerDatabase(master, name, "mysql") { CreateNewDatabase(); PlaySchemaScripts(ss); } +Mock::Mock(const std::string & name, const std::vector<boost::filesystem::path> & ss) : + Mock("options=p2testmysql", name, ss) +{ +} + AdHocFormatter(MockConnStr, "options=p2testmysql;database=%?"); DB::Connection * Mock::openConnection() const |