summaryrefslogtreecommitdiff
path: root/tests/unit/SpacedRepetitionModel/SRModel_test.h
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2021-07-14 11:49:10 +1200
committerJedidiah Barber <contact@jedbarber.id.au>2021-07-14 11:49:10 +1200
commitd24f813f3f2a05c112e803e4256b53535895fc98 (patch)
tree601e6ae9a1cd44bcfdcf91739a5ca36aedd827c9 /tests/unit/SpacedRepetitionModel/SRModel_test.h
Initial mirror commitHEADmaster
Diffstat (limited to 'tests/unit/SpacedRepetitionModel/SRModel_test.h')
-rw-r--r--tests/unit/SpacedRepetitionModel/SRModel_test.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/unit/SpacedRepetitionModel/SRModel_test.h b/tests/unit/SpacedRepetitionModel/SRModel_test.h
new file mode 100644
index 0000000..9e5d669
--- /dev/null
+++ b/tests/unit/SpacedRepetitionModel/SRModel_test.h
@@ -0,0 +1,46 @@
+#ifndef SPACED_REPETITION_MODEL_TEST_H
+#define SPACED_REPETITION_MODEL_TEST_H
+
+#include <gtest/gtest.h>
+#include <iostream>
+#include <QtCore>
+
+#include "../../../src/study/SpacedRepetitionModel.h"
+#include "../../../src/dictionary/CardPack.h"
+#include "../../mocks/Dictionary_mock.h"
+
+using std::ostream;
+
+class MockRandomGenerator;
+class Field;
+
+class TestSpacedRepetitionModel: public SpacedRepetitionModel
+{
+public:
+ TestSpacedRepetitionModel(CardPack* pack, IRandomGenerator* random):
+ SpacedRepetitionModel(pack, random) {}
+ void testPickCard() { pickNextCardAndNotify(); }
+};
+
+class SRModelTest: public testing::Test
+{
+public:
+ SRModelTest();
+
+protected:
+ void SetUp();
+ void TearDown();
+ QString createCard();
+ QString addRecord();
+
+protected:
+ MockDictionary dict;
+ int recordId;
+ Field* field1;
+ Field* field2;
+ CardPack pack;
+ MockRandomGenerator* randomGenerator;
+ TestSpacedRepetitionModel model;
+};
+
+#endif