summaryrefslogtreecommitdiff
path: root/tests/unit/Card/Card_test_QuestionAnswer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/Card/Card_test_QuestionAnswer.cpp')
-rw-r--r--tests/unit/Card/Card_test_QuestionAnswer.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/unit/Card/Card_test_QuestionAnswer.cpp b/tests/unit/Card/Card_test_QuestionAnswer.cpp
new file mode 100644
index 0000000..6100f75
--- /dev/null
+++ b/tests/unit/Card/Card_test_QuestionAnswer.cpp
@@ -0,0 +1,30 @@
+#include <gtest/gtest.h>
+
+#include "Card_test.h"
+#include "../../../src/dictionary/Card.h"
+#include "../../mocks/CardPack_mock.h"
+
+using testing::Combine;
+using testing::Values;
+using testing::WithParamInterface;
+
+class QuestionCardTest: public CardTest,
+ public WithParamInterface<const char*>
+{};
+
+INSTANTIATE_TEST_CASE_P(, QuestionCardTest,
+ Values("", "Question"));
+
+TEST_P(QuestionCardTest, getName)
+ {
+ QString question = GetParam();
+ Card card(defaultPack, question);
+ ASSERT_EQ(question, card.getName());
+ }
+
+TEST_P(QuestionCardTest, getQuestion)
+ {
+ QString question = GetParam();
+ Card card(defaultPack, question);
+ ASSERT_EQ(question, card.getQuestion());
+ }