controlpanelplugins/themeplugin/tsrc/unit/unittest_cpthemeplugin/unittest_cpthemeplugin.cpp
branchRCL_3
changeset 13 90fe62538f66
equal deleted inserted replaced
12:3fec62e6e7fc 13:90fe62538f66
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0""
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors: XENT-MV
       
    13 *
       
    14 * Description:  unit tests for the CpThemeControl class from themeplugin
       
    15 *
       
    16 */
       
    17 
       
    18 #include <QtTest/QtTest>
       
    19 
       
    20 #include "cpthemeplugin.h"
       
    21 #include <cppluginplatinterface.h>
       
    22 #include <cpitemdatahelper.h>
       
    23 
       
    24 class TestCpThemePlugin : public QObject
       
    25 {
       
    26     Q_OBJECT
       
    27 
       
    28 private slots:
       
    29     void testConstructor();
       
    30     void testCreateSettingFormItemData();
       
    31 };
       
    32 
       
    33 void TestCpThemePlugin::testConstructor()
       
    34 {
       
    35     CpThemePlugin *obj = new CpThemePlugin();
       
    36 
       
    37     delete obj;
       
    38 }
       
    39 
       
    40 void TestCpThemePlugin::testCreateSettingFormItemData()
       
    41 {
       
    42     CpThemePlugin *obj = new CpThemePlugin();
       
    43     CpItemDataHelper helper;
       
    44 
       
    45     QVERIFY(obj->createSettingFormItemData(helper).at(0) != 0);
       
    46 
       
    47     delete obj;
       
    48 }
       
    49 
       
    50 
       
    51 QTEST_MAIN(TestCpThemePlugin)
       
    52 #include "unittest_cpthemeplugin.moc"