landmarks/locationlandmarks/tsrc/LandmarkTestModule/inc/FT_CPosTp121.h
branchRCL_3
changeset 44 2b4ea9893b66
equal deleted inserted replaced
42:02ba3f1733c6 44:2b4ea9893b66
       
     1 /*
       
     2 * Copyright (c) 2005 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 *   ?description_line
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CPOSTP121_H
       
    21 #define CPOSTP121_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include "FT_CLandmarkTestProcedureBase.h"
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CPosLmMultiDbSearch;
       
    28 class CPosLmCategoryCriteria;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 *  Test procedure 121
       
    34 */
       
    35 class CPosTp121 : public CLandmarkTestProcedureBase
       
    36     {
       
    37     public:  // Constructors and destructor
       
    38         
       
    39         /**
       
    40         * C++ default constructor.
       
    41         */
       
    42         
       
    43         CPosTp121(TInt tpno, CStifLogger* aLog) : CLandmarkTestProcedureBase(tpno, aLog) {};
       
    44         /**
       
    45         * Destructor.
       
    46         */
       
    47         ~CPosTp121() {};
       
    48 
       
    49     public: // Functions from base classes
       
    50 
       
    51         void CloseTest();
       
    52 
       
    53        
       
    54         void InitTestL();
       
    55 
       
    56         /**
       
    57         * From CLandmarkTestProcedureBase
       
    58         * Runs the test in the module
       
    59         */
       
    60         void StartL();
       
    61 
       
    62     private:
       
    63 
       
    64         enum TTp121SortOrder
       
    65             {
       
    66             ESortNone,
       
    67             ESortAscending,
       
    68             ESortDescending
       
    69             };
       
    70             
       
    71         void TestSearchL(
       
    72             const RPointerArray<CCategoryLandmarkSearchResult>& aSearchResults, 
       
    73             TExecutionMode aExecutionMode = ESynchronous,
       
    74             TTp121SortOrder aSortOrder = ESortNone);
       
    75 
       
    76         void SearchNonExistingL(TExecutionMode aExecutionMode);
       
    77 
       
    78         void SearchForLandmarksInGlobalCategoriesL(TExecutionMode aExecutionMode);
       
    79 
       
    80         void AddLandmarksToGlobalCategoriesL();
       
    81 
       
    82         void TestMaximumNrOfMatchesL(
       
    83             const RPointerArray<CCategoryLandmarkSearchResult>& aSearchResults, 
       
    84             TExecutionMode aExecutionMode);
       
    85 
       
    86         void TestLeaveCodesL();
       
    87 
       
    88         void SearchAndCancelL();
       
    89         
       
    90         void ValidateIdL(TPosLmItemId aId, TInt aDbIndex);
       
    91         
       
    92         void ValidateTotalNrOfMatchesL(
       
    93             TUint aRetrievedNrOfMatches,
       
    94             TUint aExpectedNrOfMatches, 
       
    95             const TDesC& aCategoryName);
       
    96             
       
    97         void ValidateSearchResultsL(
       
    98             CCategoryLandmarkSearchResult* aExpectedSearchResult,
       
    99             CPosLmMultiDbSearch* aMultiDbSearcher,
       
   100             TTp121SortOrder aSortOrder = ESortNone);
       
   101 
       
   102         void ValidateSearchResultsL(
       
   103             const RIdArray& aExpectedIds,
       
   104             CPosLmMultiDbSearch* aMultiDbSearcher,
       
   105             TInt aNrOfExpectedErrors = 0);
       
   106 
       
   107         void SearchL(
       
   108             CPosLmCategoryCriteria* aCatSearchCriteria,
       
   109             TExecutionMode aExecutionMode,
       
   110             TBool aRefinedSearch = EFalse,
       
   111             TTp121SortOrder aSortOrder = ESortNone);
       
   112             
       
   113         void TestResetSearchAttributesL();
       
   114         
       
   115         void TestCaseInsensitiveL();
       
   116         
       
   117         void TestWildCardsL();
       
   118         
       
   119         void TestRefinedSearchL(TExecutionMode aExecutionMode);
       
   120 
       
   121         void TestDatabaseListL(const RIdArray& aExpectedMatches);
       
   122         
       
   123         void TestOnTheFlySearchL(const RIdArray& aExpectedMatches);
       
   124         
       
   125         TInt NrOfSearchErrors(CPosLmMultiDbSearch* aMultiDbSearcher);
       
   126         
       
   127     private:
       
   128 
       
   129         TUint                   iRestaurantId1;
       
   130         TUint                   iRestaurantId2;
       
   131         TUint                   iGasStationId1;
       
   132         TUint                   iGasStationId2;
       
   133         TUint                   iGarageId1;
       
   134         CDesCArray*             iDatabases;
       
   135         CPosLmMultiDbSearch*    iMultiDbSearch;
       
   136         TInt                    iNrOfDatabases;
       
   137 
       
   138     };
       
   139 
       
   140 #endif      // CPOSTP121_H
       
   141             
       
   142 // End of File