customfieldswidgettest.cpp 1.8 KB
Newer Older
Laurent Montel's avatar
Laurent Montel committed
1 2 3 4
/*
    This file is part of Akonadi Contact.

    Copyright (C) 2016 eyeOS S.L.U., a Telefonica company, sales@eyeos.com
Laurent Montel's avatar
Laurent Montel committed
5
    Copyright (C) 2016-2017 Laurent Montel <laurent.montel@kdab.com>
Laurent Montel's avatar
Laurent Montel committed
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

    This library is free software; you can redistribute it and/or modify it
    under the terms of the GNU Library General Public License as published by
    the Free Software Foundation; either version 2 of the License, or (at your
    option) any later version.

    This library is distributed in the hope that it will be useful, but WITHOUT
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
    License for more details.

    You should have received a copy of the GNU Library General Public License
    along with this library; see the file COPYING.LIB.  If not, write to the
    Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
*/

#include "customfieldswidgettest.h"
Laurent Montel's avatar
Laurent Montel committed
24
#include "../customfieldswidget.h"
Laurent Montel's avatar
Laurent Montel committed
25
#include <QTest>
Laurent Montel's avatar
Laurent Montel committed
26 27
#include <editor/customfieldeditor/customfieldeditorwidget.h>
#include <editor/customfieldeditor/customfieldslistwidget.h>
Laurent Montel's avatar
Laurent Montel committed
28 29 30 31 32 33 34 35 36 37 38 39

CustomFieldsWidgetTest::CustomFieldsWidgetTest(QObject *parent)
    : QObject(parent)
{

}

CustomFieldsWidgetTest::~CustomFieldsWidgetTest()
{

}

Laurent Montel's avatar
Laurent Montel committed
40 41 42 43 44 45 46 47 48 49
void CustomFieldsWidgetTest::shouldHaveDefaultValue()
{
    Akonadi::CustomFieldsWidget w;
    Akonadi::CustomFieldEditorWidget *customFieldEditorWidget = w.findChild<Akonadi::CustomFieldEditorWidget *>(QStringLiteral("customfieldeditorwidget"));
    QVERIFY(customFieldEditorWidget);

    Akonadi::CustomFieldsListWidget *customFieldsListWidget = w.findChild<Akonadi::CustomFieldsListWidget *>(QStringLiteral("customfieldslistwidget"));
    QVERIFY(customFieldsListWidget);
}

Laurent Montel's avatar
Laurent Montel committed
50
QTEST_MAIN(CustomFieldsWidgetTest)