summaryrefslogtreecommitdiff
path: root/tests/mocks/CardPack_mock.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mocks/CardPack_mock.h')
-rw-r--r--tests/mocks/CardPack_mock.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/mocks/CardPack_mock.h b/tests/mocks/CardPack_mock.h
new file mode 100644
index 0000000..50e6c13
--- /dev/null
+++ b/tests/mocks/CardPack_mock.h
@@ -0,0 +1,23 @@
+#ifndef CARDPACK_MOCK_H
+#define CARDPACK_MOCK_H
+
+#include <QtCore>
+
+#include "../../src/dictionary/ICardPack.h"
+
+class CardPackMock: public ICardPack
+{
+public:
+ void addStudyRecord(const QString cardId, const StudyRecord& studyRecord);
+ QList<StudyRecord> getStudyRecords(QString cardId) const;
+ StudyRecord getStudyRecord(QString cardId) const;
+
+ QList<DicRecord*> getRecords() const;
+ const Field* getQuestionField() const;
+ QList<const Field*> getAnswerFields() const;
+
+private:
+ QMultiHash< QString, StudyRecord > studyRecords;
+};
+
+#endif