1 /*
2   This file is part of KAddressBook.
3 
4   SPDX-FileCopyrightText: 2015-2021 Laurent Montel <montel@kde.org>
5 
6   SPDX-License-Identifier: GPL-2.0-or-later
7 */
8 
9 #include "sendvcardsjobtest.h"
10 #include "sendvcards/sendvcardsjob.h"
11 #include <Akonadi/Item>
12 #include <QTest>
SendVcardsJobTest(QObject * parent)13 SendVcardsJobTest::SendVcardsJobTest(QObject *parent)
14     : QObject(parent)
15 {
16 }
17 
~SendVcardsJobTest()18 SendVcardsJobTest::~SendVcardsJobTest()
19 {
20 }
21 
shouldNotStartWhenListAddressIsEmpty()22 void SendVcardsJobTest::shouldNotStartWhenListAddressIsEmpty()
23 {
24     Akonadi::Item::List lst;
25     KABSendVCards::SendVcardsJob job(lst);
26     QVERIFY(!job.start());
27 }
28 
shouldHasDefaultValue()29 void SendVcardsJobTest::shouldHasDefaultValue()
30 {
31     Akonadi::Item::List lst;
32     KABSendVCards::SendVcardsJob job(lst);
33     QCOMPARE(job.version(), KContacts::VCardConverter::v3_0);
34 }
35 
shouldChangeExportVersion()36 void SendVcardsJobTest::shouldChangeExportVersion()
37 {
38     Akonadi::Item::List lst;
39     KABSendVCards::SendVcardsJob job(lst);
40     job.setVersion(KContacts::VCardConverter::v4_0);
41     QCOMPARE(job.version(), KContacts::VCardConverter::v4_0);
42 }
43 
44 QTEST_MAIN(SendVcardsJobTest)
45