aboutsummaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/Tests/TestUtils/dbattachermock.h
diff options
context:
space:
mode:
Diffstat (limited to 'SQLiteStudio3/Tests/TestUtils/dbattachermock.h')
-rw-r--r--SQLiteStudio3/Tests/TestUtils/dbattachermock.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/SQLiteStudio3/Tests/TestUtils/dbattachermock.h b/SQLiteStudio3/Tests/TestUtils/dbattachermock.h
new file mode 100644
index 0000000..b3ab345
--- /dev/null
+++ b/SQLiteStudio3/Tests/TestUtils/dbattachermock.h
@@ -0,0 +1,23 @@
+#ifndef DBATTACHERMOCK_H
+#define DBATTACHERMOCK_H
+
+#include "dbattacher.h"
+
+class DbAttacherMock : public DbAttacher
+{
+ public:
+ bool attachDatabases(const QString&);
+ bool attachDatabases(const QList<SqliteQueryPtr>&);
+ bool attachDatabases(SqliteQueryPtr);
+ void detachDatabases();
+ BiStrHash getDbNameToAttach() const;
+ QString getQuery() const;
+};
+
+class DbAttacherFactoryMock : public DbAttacherFactory
+{
+ public:
+ DbAttacher* create(Db*);
+};
+
+#endif // DBATTACHERMOCK_H