akonadi
20 #include "emaileditdialogtest.h"
21 #include "../emaileditwidget.h"
22 #include "kabc/email.h"
23 #include <qtest_kde.h>
24 #include <KListWidget>
25 #include <qpushbutton.h>
26 EmailEditDialogTest::EmailEditDialogTest(
QObject *parent)
32 EmailEditDialogTest::~EmailEditDialogTest()
37 void EmailEditDialogTest::shouldHaveDefaultValue()
40 KListWidget *listwidget = qFindChild<KListWidget *>(&dlg,
QLatin1String(
"emailListBox"));
42 QCOMPARE(listwidget->count(), 0);
46 button = qFindChild<QPushButton *>(&dlg,
QLatin1String(
"remove"));
48 button = qFindChild<QPushButton *>(&dlg,
QLatin1String(
"edit"));
50 button = qFindChild<QPushButton *>(&dlg,
QLatin1String(
"standard"));
54 void EmailEditDialogTest::shouldAddItems()
57 KListWidget *listwidget = qFindChild<KListWidget *>(&dlg,
QLatin1String(
"emailListBox"));
58 KABC::Email::List lst;
62 dlg.setEmailList(lst);
63 QCOMPARE(listwidget->count(), lst.count());
66 void EmailEditDialogTest::shouldDontAddTwiceItem()
69 KListWidget *listwidget = qFindChild<KListWidget *>(&dlg,
QLatin1String(
"emailListBox"));
70 KABC::Email::List lst;
75 dlg.setEmailList(lst);
76 QCOMPARE(listwidget->count(), (lst.count()-1));
79 QTEST_KDEMAIN(EmailEditDialogTest, GUI)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:03 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.