locationmgmt/locmonitor/test/LocInfoConversionUnitTest/src/LocInfoConversionUnitTest.cpp
author Billy Gibson <Billy.Gibson@nokia.com>
Fri, 28 May 2010 18:01:03 +0100
branchGeoConversion
changeset 34 0c0ad64c882c
permissions -rw-r--r--
Updated version of the Location Monitor supporting the new New GeoConversion interfaces. Also includes API help information
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
     1
/*
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
     8
*
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    11
*
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    12
* Contributors:
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    13
* 
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    14
* Description: This file contains testclass implementation.
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    15
*
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    16
*/
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    17
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    18
// INCLUDE FILES
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    19
#include <Stiftestinterface.h>
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    20
#include "LocInfoConversionUnitTest.h"
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    21
#include <SettingServerClient.h>
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    22
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    23
// EXTERNAL DATA STRUCTURES
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    24
//extern  ?external_data;
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    25
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    26
// EXTERNAL FUNCTION PROTOTYPES  
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    27
//extern ?external_function( ?arg_type,?arg_type );
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    28
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    29
// CONSTANTS
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    30
//const ?type ?constant_var = ?constant;
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    31
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    32
// MACROS
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    33
//#define ?macro ?macro_def
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    34
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    35
// LOCAL CONSTANTS AND MACROS
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    36
//const ?type ?constant_var = ?constant;
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    37
//#define ?macro_name ?macro_def
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    38
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    39
// MODULE DATA STRUCTURES
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    40
//enum ?declaration
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    41
//typedef ?declaration
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    42
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    43
// LOCAL FUNCTION PROTOTYPES
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    44
//?type ?function_name( ?arg_type, ?arg_type );
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    45
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    46
// FORWARD DECLARATIONS
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    47
//class ?FORWARD_CLASSNAME;
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    48
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    49
// ============================= LOCAL FUNCTIONS ===============================
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    50
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    51
// -----------------------------------------------------------------------------
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    52
// ?function_name ?description.
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    53
// ?description
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    54
// Returns: ?value_1: ?description
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    55
//          ?value_n: ?description_line1
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    56
//                    ?description_line2
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    57
// -----------------------------------------------------------------------------
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    58
//
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    59
/*
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    60
?type ?function_name(
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    61
    ?arg_type arg,  // ?description
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    62
    ?arg_type arg)  // ?description
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    63
    {
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    64
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    65
    ?code  // ?comment
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    66
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    67
    // ?comment
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    68
    ?code
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    69
    }
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    70
*/
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    71
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    72
// ============================ MEMBER FUNCTIONS ===============================
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    73
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    74
// -----------------------------------------------------------------------------
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    75
// CLocInfoConversionUnitTest::CLocInfoConversionUnitTest
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    76
// C++ default constructor can NOT contain any code, that
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    77
// might leave.
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    78
// -----------------------------------------------------------------------------
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    79
//
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    80
CLocInfoConversionUnitTest::CLocInfoConversionUnitTest( 
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    81
    CTestModuleIf& aTestModuleIf ):
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    82
        CScriptBase( aTestModuleIf )
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    83
    {
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    84
    }
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    85
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    86
// -----------------------------------------------------------------------------
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    87
// CLocInfoConversionUnitTest::ConstructL
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    88
// Symbian 2nd phase constructor can leave.
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    89
// -----------------------------------------------------------------------------
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    90
//
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    91
void CLocInfoConversionUnitTest::ConstructL()
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    92
    {
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    93
    //Read logger settings to check whether test case name is to be
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    94
    //appended to log file name.
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    95
    RSettingServer settingServer;
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    96
    TInt ret = settingServer.Connect();
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    97
    if(ret != KErrNone)
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    98
        {
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
    99
        User::Leave(ret);
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   100
        }
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   101
    // Struct to StifLogger settigs.
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   102
    TLoggerSettings loggerSettings; 
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   103
    // Parse StifLogger defaults from STIF initialization file.
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   104
    ret = settingServer.GetLoggerSettings(loggerSettings);
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   105
    if(ret != KErrNone)
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   106
        {
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   107
        User::Leave(ret);
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   108
        } 
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   109
    // Close Setting server session
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   110
    settingServer.Close();
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   111
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   112
    TFileName logFileName;
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   113
    
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   114
    if(loggerSettings.iAddTestCaseTitle)
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   115
        {
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   116
        TName title;
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   117
        TestModuleIf().GetTestCaseTitleL(title);
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   118
        logFileName.Format(KLocInfoConversionUnitTestLogFileWithTitle, &title);
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   119
        }
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   120
    else
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   121
        {
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   122
        logFileName.Copy(KLocInfoConversionUnitTestLogFile);
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   123
        }
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   124
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   125
    iLog = CStifLogger::NewL( KLocInfoConversionUnitTestLogPath, 
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   126
                          logFileName,
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   127
                          CStifLogger::ETxt,
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   128
                          CStifLogger::EFile,
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   129
                          EFalse );
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   130
    
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   131
    SendTestClassVersion();
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   132
    iConversionHandler = CLocInfoConversionHanlder::NewL();
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   133
    iConversionHandler1 = CLocInfoConversionHanlder::NewL();
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   134
    }
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   135
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   136
// -----------------------------------------------------------------------------
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   137
// CLocInfoConversionUnitTest::NewL
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   138
// Two-phased constructor.
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   139
// -----------------------------------------------------------------------------
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   140
//
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   141
CLocInfoConversionUnitTest* CLocInfoConversionUnitTest::NewL( 
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   142
    CTestModuleIf& aTestModuleIf )
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   143
    {
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   144
    CLocInfoConversionUnitTest* self = new (ELeave) CLocInfoConversionUnitTest( aTestModuleIf );
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   145
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   146
    CleanupStack::PushL( self );
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   147
    self->ConstructL();
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   148
    CleanupStack::Pop();
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   149
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   150
    return self;
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   151
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   152
    }
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   153
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   154
// Destructor
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   155
CLocInfoConversionUnitTest::~CLocInfoConversionUnitTest()
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   156
    { 
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   157
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   158
    // Delete resources allocated from test methods
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   159
    Delete();
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   160
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   161
    // Delete logger
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   162
    delete iLog; 
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   163
    delete iConversionHandler;
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   164
    delete iConversionHandler1;
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   165
    }
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   166
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   167
//-----------------------------------------------------------------------------
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   168
// CLocInfoConversionUnitTest::SendTestClassVersion
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   169
// Method used to send version of test class
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   170
//-----------------------------------------------------------------------------
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   171
//
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   172
void CLocInfoConversionUnitTest::SendTestClassVersion()
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   173
	{
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   174
	TVersion moduleVersion;
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   175
	moduleVersion.iMajor = TEST_CLASS_VERSION_MAJOR;
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   176
	moduleVersion.iMinor = TEST_CLASS_VERSION_MINOR;
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   177
	moduleVersion.iBuild = TEST_CLASS_VERSION_BUILD;
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   178
	
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   179
	TFileName moduleName;
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   180
	moduleName = _L("LocInfoConversionUnitTest.dll");
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   181
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   182
	TBool newVersionOfMethod = ETrue;
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   183
	TestModuleIf().SendTestModuleVersion(moduleVersion, moduleName, newVersionOfMethod);
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   184
	}
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   185
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   186
// ========================== OTHER EXPORTED FUNCTIONS =========================
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   187
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   188
// -----------------------------------------------------------------------------
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   189
// LibEntryL is a polymorphic Dll entry point.
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   190
// Returns: CScriptBase: New CScriptBase derived object
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   191
// -----------------------------------------------------------------------------
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   192
//
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   193
EXPORT_C CScriptBase* LibEntryL( 
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   194
    CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   195
    {
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   196
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   197
    return ( CScriptBase* ) CLocInfoConversionUnitTest::NewL( aTestModuleIf );
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   198
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   199
    }
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   200
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   201
0c0ad64c882c Updated version of the Location Monitor supporting the new New GeoConversion interfaces.
Billy Gibson <Billy.Gibson@nokia.com>
parents:
diff changeset
   202
//  End of File