musicplayer_plat/mpx_music_store_api/tsrc/mpxmusicstoretest/src/mpxmusicstoretestBlocks.cpp
changeset 0 ff3acec5bc43
equal deleted inserted replaced
-1:000000000000 0:ff3acec5bc43
       
     1 /*
       
     2 * Copyright (c) 2002 - 2007 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:  CmpxMusicStoreTest test class for STIF Test Framework TestScripter.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // [INCLUDE FILES] - do not remove
       
    21 #include <e32svr.h>
       
    22 #include <StifParser.h>
       
    23 #include <Stiftestinterface.h>
       
    24 #include "mpxmusicstoretest.h"
       
    25 
       
    26 
       
    27 
       
    28 // ============================ MEMBER FUNCTIONS ===============================
       
    29 
       
    30 // -----------------------------------------------------------------------------
       
    31 // CmpxMusicStoreTest::Delete
       
    32 // Delete here all resources allocated and opened from test methods. 
       
    33 // Called from destructor. 
       
    34 // -----------------------------------------------------------------------------
       
    35 //
       
    36 void CmpxMusicStoreTest::Delete() 
       
    37     {
       
    38 
       
    39     }
       
    40 
       
    41 // -----------------------------------------------------------------------------
       
    42 // CmpxMusicStoreTest::RunMethodL
       
    43 // Run specified method. Contains also table of test mothods and their names.
       
    44 // -----------------------------------------------------------------------------
       
    45 //
       
    46 TInt CmpxMusicStoreTest::RunMethodL( 
       
    47     CStifItemParser& aItem ) 
       
    48     {
       
    49 
       
    50     static TStifFunctionInfo const KFunctions[] =
       
    51         {  
       
    52         // Copy this line for every implemented function.
       
    53         // First string is the function name used in TestScripter script file.
       
    54         // Second is the actual implementation member function. 
       
    55         ENTRY( "Example", CmpxMusicStoreTest::ExampleL ),
       
    56         ENTRY( "CMPXFindInMShopCreate", CmpxMusicStoreTest::CMPXFindInMShopCreate ),
       
    57         ENTRY( "CMPXFindInMShopDestructor", CmpxMusicStoreTest::CMPXFindInMShopDestructor ),
       
    58        
       
    59 
       
    60         //ADD NEW ENTRY HERE
       
    61         // [test cases entries] - Do not remove
       
    62 
       
    63         };
       
    64 
       
    65     const TInt count = sizeof( KFunctions ) / 
       
    66                         sizeof( TStifFunctionInfo );
       
    67 
       
    68     return RunInternalL( KFunctions, count, aItem );
       
    69 
       
    70     }
       
    71 
       
    72 // -----------------------------------------------------------------------------
       
    73 // CmpxMusicStoreTest::ExampleL
       
    74 // Example test method function.
       
    75 // (other items were commented in a header).
       
    76 // -----------------------------------------------------------------------------
       
    77 //
       
    78 TInt CmpxMusicStoreTest::ExampleL( CStifItemParser& aItem )
       
    79     {
       
    80 
       
    81     // Print to UI
       
    82     _LIT( KmpxMusicStoreTest, "mpxMusicStoreTest" );
       
    83     _LIT( KExample, "In Example" );
       
    84     TestModuleIf().Printf( 0, KmpxMusicStoreTest, KExample );
       
    85     // Print to log file
       
    86     iLog->Log( KExample );
       
    87 
       
    88     TInt i = 0;
       
    89     TPtrC string;
       
    90     _LIT( KParam, "Param[%i]: %S" );
       
    91     while ( aItem.GetNextString ( string ) == KErrNone )
       
    92         {
       
    93         TestModuleIf().Printf( i, KmpxMusicStoreTest, 
       
    94                                 KParam, i, &string );
       
    95         i++;
       
    96         }
       
    97 
       
    98     return KErrNone;
       
    99 
       
   100     }
       
   101 
       
   102 // -----------------------------------------------------------------------------
       
   103 // CmpxMusicStoreTest::CMPXFindInMShopCreate
       
   104 // ?implementation_description
       
   105 // (other items were commented in a header).
       
   106 // -----------------------------------------------------------------------------
       
   107 //
       
   108 TInt CmpxMusicStoreTest::CMPXFindInMShopCreate( CStifItemParser& /*aItem*/ )
       
   109 	{
       
   110 	 TInt err=KErrNone;
       
   111      iLog->Log(_L("CmpxMusicStoreTest::CMPXFindInMShopCreate"));
       
   112     
       
   113     // iMPXFindInMShop=CMPXFindInMShop::NewL();
       
   114     
       
   115 	 iLog->Log(_L("CmpxMusicStoreTest::NewL returned: %d"), err);
       
   116      return err;
       
   117 	}
       
   118 
       
   119 // -----------------------------------------------------------------------------
       
   120 // CmpxMusicStoreTest::CMPXFindInMShopDestructor
       
   121 // ?implementation_description
       
   122 // (other items were commented in a header).
       
   123 // -----------------------------------------------------------------------------
       
   124 //
       
   125 TInt CmpxMusicStoreTest::CMPXFindInMShopDestructor( CStifItemParser& /*aItem*/ )
       
   126 	{
       
   127 	 TInt err=KErrNone;
       
   128      iLog->Log(_L("CmpxMusicStoreTest::CMPXFindInMShopDestructor"));
       
   129     
       
   130     /* if(iMPXFindInMShop!=NULL)
       
   131        {
       
   132 	    delete iMPXFindInMShop;
       
   133 	    iMPXFindInMShop=NULL;
       
   134        }*/
       
   135 	 iLog->Log(_L("CmpxMusicStoreTest::NewL returned: %d"), err);
       
   136 	// REComSession::FinalClose();
       
   137      return err;
       
   138 	}
       
   139 
       
   140 
       
   141 
       
   142 // ========================== OTHER EXPORTED FUNCTIONS =========================
       
   143 // None
       
   144 
       
   145 //  [End of File] - Do not remove