From 35382065da97e8e98c3883caebc0b8f51aa33e90 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 24 Sep 2015 03:05:12 +0100 Subject: SQLite mocking and tests from Project2 --- libsqlitepp/mock.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 libsqlitepp/mock.h (limited to 'libsqlitepp/mock.h') 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 +#include +#include + +namespace SQLite { + +class DLL_PUBLIC Mock : public DB::MockDatabase { + public: + Mock(const std::string & name, const std::vector & ss); + ~Mock(); + + protected: + void DropDatabase() const override; + void CreateNewDatabase() const override; + + DB::Connection * openConnection() const override; + + private: + const boost::filesystem::path testDbPath; +}; + +} + +#endif + + -- cgit v1.2.3