vmbx/vmbxcpplugin/tsrc/src/ut_vmbxuiengine.cpp
changeset 13 e32024264ebb
child 19 e44a8c097b15
equal deleted inserted replaced
12:ae8abd0db65c 13:e32024264ebb
       
     1 /*
       
     2 * Copyright (c) 2009 - 2010 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:
       
    13 *
       
    14 * Description:  Implementation of the Ut_VmbxUiEngine class
       
    15 *
       
    16 */
       
    17 
       
    18 // System includes
       
    19 #include <QtTest/QtTest>
       
    20 
       
    21 // User includes
       
    22 #include "vmbxuiengine.h"
       
    23 #include "ut_vmbxuiengine.h"
       
    24 
       
    25 /*!
       
    26     Ut_VmbxUiEngine::Ut_VmbxUiEngine
       
    27     Default constructor, remember to null new members here.
       
    28 */
       
    29 Ut_VmbxUiEngine::Ut_VmbxUiEngine()
       
    30 {
       
    31     qDebug("Ut_VmbxUiEngine <>");
       
    32 }
       
    33 
       
    34 /*!
       
    35     Ut_VmbxUiEngine::~Ut_VmbxUiEngine
       
    36 */
       
    37 Ut_VmbxUiEngine::~Ut_VmbxUiEngine()
       
    38 {
       
    39     qDebug("~Ut_VmbxUiEngine <>");
       
    40 }
       
    41 
       
    42 /*!
       
    43     Ut_VmbxUiEngine::initTestCase
       
    44     QTestLib initialization method, called for each test case.
       
    45 */
       
    46 void Ut_VmbxUiEngine::initTestCase()
       
    47 {
       
    48     qDebug("initTestCase >");
       
    49     mUiEngine = new VmbxUiEngine();
       
    50     QVERIFY(mUiEngine);
       
    51     qDebug("initTestCase <");
       
    52 }
       
    53 
       
    54 /*!
       
    55     Ut_VmbxUiEngine::cleanupTestCase
       
    56     QTestLib cleanup method, called for each test case.
       
    57 */
       
    58 void Ut_VmbxUiEngine::cleanupTestCase()
       
    59 {
       
    60     qDebug("cleanupTestCase >");
       
    61     if ( mUiEngine ) {
       
    62         delete mUiEngine;
       
    63         mUiEngine = NULL;
       
    64     }
       
    65     qDebug("cleanupTestCase <");
       
    66 }
       
    67 
       
    68 /*!
       
    69     Ut_VmbxUiEngine::testGetCsVoice1Number
       
    70     testCreateVmbxEntry test case
       
    71     Connects to test object signal and verifies received data.
       
    72 */
       
    73 void Ut_VmbxUiEngine::testGetCsVoice1Number()
       
    74 {
       
    75     qDebug("testGetCsVoice1Number >");
       
    76     QString voice1;
       
    77     QVERIFY(mUiEngine);
       
    78     mUiEngine->getCsVoice1Number(voice1);
       
    79     qDebug("testGetCsVoice1Number <");
       
    80 }
       
    81 
       
    82 /*!
       
    83     Ut_VmbxUiEngine::testCreateVmbxMailbox
       
    84     CreateVmbxMailbox test case
       
    85     Connects to test object signal and verifies received data.
       
    86 */
       
    87 void Ut_VmbxUiEngine::testGetCsVoice2Number()
       
    88 {
       
    89     qDebug("testGetCsVoice2Number >");
       
    90     QString voice2;
       
    91     QVERIFY(mUiEngine);
       
    92     mUiEngine->getCsVoice2Number(voice2);
       
    93     qDebug("testGetCsVoice2Number <");
       
    94 }
       
    95 
       
    96 /*!
       
    97     Ut_VmbxUiEngine::testGetCsVideo1Number
       
    98     testVmbxType test case
       
    99     Connects to test object signal and verifies received data.
       
   100 */
       
   101 void Ut_VmbxUiEngine::testGetCsVideo1Number()
       
   102 {
       
   103     qDebug("testGetCsVideo1Number >");
       
   104     QString video1;
       
   105     QVERIFY(mUiEngine);
       
   106     mUiEngine->getCsVideo1Number(video1);
       
   107 
       
   108     qDebug("testGetCsVideo1Number <");
       
   109 }
       
   110 
       
   111 /*!
       
   112     Ut_VmbxUiEngine::testUiCsVoice1Changed
       
   113     testServiceId test case
       
   114     Connects to test object signal and verifies received data.
       
   115 */
       
   116 void Ut_VmbxUiEngine::testUiCsVoice1Changed()
       
   117 {
       
   118     qDebug("testUiCsVoice1Changed >");
       
   119     QVERIFY(mUiEngine);
       
   120     QString newNumber("123456");
       
   121     mUiEngine->uiCsVoice1Changed(newNumber);
       
   122     qDebug("testUiCsVoice1Changed <");
       
   123 }
       
   124 
       
   125 //End file