summaryrefslogtreecommitdiff
path: root/tests/unit/Card/Card_test_QuestionAnswer.cpp
blob: 6100f7553dc663a9ccd39c4571d7355c3f8a0cc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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());
    }