logsui/logsengine/logssymbianos/tsrc/ut_logssymbianos/src/ut_logssystemtimeobserver.cpp
changeset 15 76d2cf7a585e
parent 13 52d644758b05
child 17 90fe74753f71
equal deleted inserted replaced
13:52d644758b05 15:76d2cf7a585e
     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:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 #include "ut_logssystemtimeobserver.h"
       
    18 #include "logssystemtimeobserver.h"
       
    19 #include <QtTest/QtTest>
       
    20 #include <HbExtendedLocale>
       
    21 #include <bacntf.h> 
       
    22 
       
    23 void UT_LogsSystemTimeObserver::initTestCase()
       
    24 {
       
    25 }
       
    26 
       
    27 void UT_LogsSystemTimeObserver::cleanupTestCase()
       
    28 {
       
    29 }
       
    30 
       
    31 void UT_LogsSystemTimeObserver::init()
       
    32 {    
       
    33     mTimeObserver = new LogsSystemTimeObserver();
       
    34 }
       
    35 
       
    36 void UT_LogsSystemTimeObserver::cleanup()
       
    37 {
       
    38     delete mTimeObserver;
       
    39 }
       
    40 
       
    41 void UT_LogsSystemTimeObserver::testConstructor()
       
    42 {
       
    43     QVERIFY( mTimeObserver );
       
    44     QVERIFY( mTimeObserver->mEnvChangeNotifier->IsActive() );
       
    45 }
       
    46 
       
    47 void UT_LogsSystemTimeObserver::testEnvironmentChangeCallback()
       
    48 {
       
    49     QSignalSpy spy(mTimeObserver, SIGNAL(timeFormatChanged()));
       
    50     QCOMPARE( mTimeObserver->EnvironmentChangeCallback(mTimeObserver), 0 );
       
    51     QCOMPARE( spy.count(), 0 );
       
    52 }