summaryrefslogtreecommitdiff
path: root/libsqlitepp/sqlite-mock.h
blob: 45caef9e37c20c31cf422e83624ead19070257a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef MOCKSQLITEDATASOURCE_H
#define MOCKSQLITEDATASOURCE_H

#include <mockDatabase.h>
#include <filesystem>
#include <visibility.h>
#include <c++11Helpers.h>

namespace SQLite {

class DLL_PUBLIC Mock : public DB::MockDatabase {
	public:
		Mock(const std::string & root, const std::string & name, const std::vector<std::filesystem::path> & ss);
		Mock(const std::string & name, const std::vector<std::filesystem::path> & ss);
		~Mock() override;

		SPECIAL_MEMBERS_MOVE_RO(Mock);

	protected:
		void DropDatabase() const override;
		void CreateNewDatabase() const override;

		[[nodiscard]] DB::ConnectionPtr openConnection() const override;

	private:
		const std::filesystem::path testDbPath;
};

}

#endif