diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2021-07-14 11:49:10 +1200 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2021-07-14 11:49:10 +1200 |
commit | d24f813f3f2a05c112e803e4256b53535895fc98 (patch) | |
tree | 601e6ae9a1cd44bcfdcf91739a5ca36aedd827c9 /tests/unit/Card/Card_test_QuestionAnswer.cpp |
Diffstat (limited to 'tests/unit/Card/Card_test_QuestionAnswer.cpp')
-rw-r--r-- | tests/unit/Card/Card_test_QuestionAnswer.cpp | 30 |
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()); + } |