From d24f813f3f2a05c112e803e4256b53535895fc98 Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Wed, 14 Jul 2021 11:49:10 +1200 Subject: Initial mirror commit --- tests/unit/SpacedRepetitionModel/SRModel_test.h | 46 +++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 tests/unit/SpacedRepetitionModel/SRModel_test.h (limited to 'tests/unit/SpacedRepetitionModel/SRModel_test.h') 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 +#include +#include + +#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 -- cgit