summaryrefslogtreecommitdiff
path: root/libsqlitepp/mock.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-09-24 03:05:12 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2015-09-24 03:06:07 +0100
commit35382065da97e8e98c3883caebc0b8f51aa33e90 (patch)
tree5b53d246def27e0f588ab0d02a91532e0c913908 /libsqlitepp/mock.h
parentConnector compatibility fix (diff)
downloadlibdbpp-sqlite-35382065da97e8e98c3883caebc0b8f51aa33e90.tar.bz2
libdbpp-sqlite-35382065da97e8e98c3883caebc0b8f51aa33e90.tar.xz
libdbpp-sqlite-35382065da97e8e98c3883caebc0b8f51aa33e90.zip
SQLite mocking and tests from Project2
Diffstat (limited to 'libsqlitepp/mock.h')
-rw-r--r--libsqlitepp/mock.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/libsqlitepp/mock.h b/libsqlitepp/mock.h
new file mode 100644
index 0000000..8bd0899
--- /dev/null
+++ b/libsqlitepp/mock.h
@@ -0,0 +1,29 @@
+#ifndef MOCKSQLITEDATASOURCE_H
+#define MOCKSQLITEDATASOURCE_H
+
+#include <mockDatabase.h>
+#include <boost/filesystem/path.hpp>
+#include <visibility.h>
+
+namespace SQLite {
+
+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;
+
+ DB::Connection * openConnection() const override;
+
+ private:
+ const boost::filesystem::path testDbPath;
+};
+
+}
+
+#endif
+
+