telutils/dialpad/tsrc/unit/ut_dialpadbutton/ut_dialpadbutton.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 03 May 2010 13:01:45 +0300
changeset 15 d7fc66ccd6fb
child 32 1f002146abb4
permissions -rw-r--r--
Revision: 201015 Kit: 201018

/*!
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:
*
*/

#include <QtGui>
#include <QtTest/QtTest>

#include <hbapplication.h>

#include "dialpadtest.h"
#include "dialpadbutton.h"

class ut_DialpadButton : public QObject
{
    Q_OBJECT

private slots:
    void initTestCase();
    void cleanupTestCase();

    void testButtonType();

private:
    DialpadButton *mButton;
};

void ut_DialpadButton::initTestCase()
{
    mButton = new DialpadButton();
}

void ut_DialpadButton::cleanupTestCase()
{
    delete mButton;
}

void ut_DialpadButton::testButtonType()
{
    QVERIFY(mButton->buttonType()==DialpadButton::NumericButton);
    mButton->setButtonType(DialpadButton::FunctionButton);
    QVERIFY(mButton->buttonType()==DialpadButton::FunctionButton);
}

DIALPAD_TEST_MAIN(ut_DialpadButton)
#include "ut_dialpadbutton.moc"