homescreensrv_plat/sapi_homescreenplugin/tsrc/hspsconfigurationif/src/mt_hspsconfigurationif.cpp
branchRCL_3
changeset 12 502e5d91ad42
parent 8 d0529222e3f0
child 14 15e4dd19031c
equal deleted inserted replaced
11:bd874ee5e5e2 12:502e5d91ad42
   116 #include "mt_hsps_setactiveplugin_6.h"
   116 #include "mt_hsps_setactiveplugin_6.h"
   117 // restore configurations
   117 // restore configurations
   118 #include "mt_hsps_restoreconfigurations_1.h"
   118 #include "mt_hsps_restoreconfigurations_1.h"
   119 // customizations
   119 // customizations
   120 #include "mt_hsps_customization_1.h"
   120 #include "mt_hsps_customization_1.h"
       
   121 // restoractiveeappconf
       
   122 #include "mt_hsps_restoreactiveappconf_1.h"
       
   123 #include "mt_hsps_restoreactiveappconf_2.h"
   121 
   124 
   122 // ======== LOCAL CONSTANTS ====================================================
   125 // ======== LOCAL CONSTANTS ====================================================
   123 
   126 
   124 // Resource files copied by minimal configuration.
   127 // Resource files copied by minimal configuration.
   125 _LIT( KMinimalResourceFile1, "c:\\private\\20000fb1\\2456\\270513751\\536916225\\1.0\\sources\\main.xml"  );
   128 _LIT( KMinimalResourceFile1, "c:\\private\\20000fb1\\2456\\270513751\\536916225\\1.0\\sources\\main.xml"  );
  2990                 
  2993                 
  2991     CleanupStack::PopAndDestroy( installationService );    
  2994     CleanupStack::PopAndDestroy( installationService );    
  2992     }
  2995     }
  2993 
  2996 
  2994 //------------------------------------------------------------------------------
  2997 //------------------------------------------------------------------------------
       
  2998 // Test case: RestoreActiveAppConf(1)
       
  2999 //------------------------------------------------------------------------------
       
  3000 void MT_CHSPSConfigurationIf::RestoreActiveAppConf_1_L()
       
  3001     {        
       
  3002     // Pre conditions: activate configuration which hasn't got statuslicenceerestorable status        
       
  3003     EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Minimal" ) );
       
  3004     SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfMinimal );    
       
  3005 
       
  3006     // Get ODT and fill in the plugin DOMs
       
  3007     EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) );
       
  3008     AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid );
       
  3009     
       
  3010     // Test step 1: invalidate state of the active application configuration
       
  3011     EUNIT_PRINT( _L8( "Test step 1" ) );    
       
  3012     RunTestStepSyncL(                   
       
  3013         ( TUint8* )restoreactiveappconf_1_ts_1_method,
       
  3014         ( TUint8* )restoreactiveappconf_1_ts_1_input,
       
  3015         ( TUint8* )restoreactiveappconf_1_ts_1_output );   
       
  3016     EUNIT_PRINT( _L8( "Test step passed" ) );
       
  3017         
       
  3018     // Test step 2: retrieve the app conf, Operator configuration should be now active    
       
  3019     EUNIT_PRINT( _L8( "Test step 2" ) );
       
  3020     RunTestStepSyncL(                   
       
  3021         ( TUint8* )restoreactiveappconf_1_ts_2_method,
       
  3022         ( TUint8* )restoreactiveappconf_1_ts_2_input,
       
  3023         ( TUint8* )restoreactiveappconf_1_ts_2_output );        
       
  3024     EUNIT_PRINT( _L8( "Test step passed" ) );
       
  3025     }
       
  3026 
       
  3027 
       
  3028 //------------------------------------------------------------------------------
       
  3029 // Test case: RestoreActiveAppConfL(2)
       
  3030 //------------------------------------------------------------------------------
       
  3031 void MT_CHSPSConfigurationIf::RestoreActiveAppConf_2_L()
       
  3032     {        
       
  3033     // Pre conditions: activate configuration with a statuslicenceerestorable status        
       
  3034     EUNIT_PRINT( _L8( "Pre conditions: Set Active configuration Operator" ) );
       
  3035     SetActiveConfigurationL( KHSPSTestAppUid, KHSPSActiveConfOperator );    
       
  3036 
       
  3037     // Get ODT and fill in the plugin DOMs
       
  3038     EUNIT_PRINT( _L8( "Pre conditions: Attach to HSPS service IConfiguration interface" ) );
       
  3039     AttachServiceL( KHSPS, KHSPSConfigurationIf, KHSPSTestAppUid );
       
  3040     
       
  3041     // Test step 1: invalidate state of the active application configuration
       
  3042     EUNIT_PRINT( _L8( "Test step 1" ) );    
       
  3043     RunTestStepSyncL(                   
       
  3044         ( TUint8* )restoreactiveappconf_2_ts_1_method,
       
  3045         ( TUint8* )restoreactiveappconf_2_ts_1_input,
       
  3046         ( TUint8* )restoreactiveappconf_2_ts_1_output );   
       
  3047     EUNIT_PRINT( _L8( "Test step passed" ) );
       
  3048         
       
  3049     // Test step 2: retrieve the app conf, we should fail installing the Operator 
       
  3050     // configuration as it is not in ROM
       
  3051     EUNIT_PRINT( _L8( "Test step 2" ) );
       
  3052     RunTestStepSyncL(                   
       
  3053         ( TUint8* )restoreactiveappconf_2_ts_2_method,
       
  3054         ( TUint8* )restoreactiveappconf_2_ts_2_input,
       
  3055         ( TUint8* )restoreactiveappconf_2_ts_2_output );        
       
  3056     EUNIT_PRINT( _L8( "Test step passed" ) );
       
  3057     }
       
  3058 
       
  3059 //------------------------------------------------------------------------------
  2995 // Test case table
  3060 // Test case table
  2996 //------------------------------------------------------------------------------
  3061 //------------------------------------------------------------------------------
  2997 EUNIT_BEGIN_TEST_TABLE(
  3062 EUNIT_BEGIN_TEST_TABLE(
  2998     MT_CHSPSConfigurationIf,
  3063     MT_CHSPSConfigurationIf,
  2999     "This is a test suite for HSPS configuration interface.",
  3064     "This is a test suite for HSPS configuration interface.",
  3524        "IConfiguration",
  3589        "IConfiguration",
  3525        "SetActivePlugin",
  3590        "SetActivePlugin",
  3526        "FUNCTIONALITY",
  3591        "FUNCTIONALITY",
  3527        SetupL, Customization_1_L, Teardown )
  3592        SetupL, Customization_1_L, Teardown )
  3528 
  3593 
       
  3594     EUNIT_TEST(   
       
  3595        "RestoreActiveAppConfL(1)",
       
  3596        "IConfiguration",
       
  3597        "SetActivePlugin",
       
  3598        "FUNCTIONALITY",
       
  3599        SetupL, RestoreActiveAppConf_1_L, Teardown )
       
  3600 
       
  3601     EUNIT_TEST(   
       
  3602        "RestoreActiveAppConfL(2)",
       
  3603        "IConfiguration",
       
  3604        "SetActivePlugin",
       
  3605        "FUNCTIONALITY",
       
  3606        SetupL, RestoreActiveAppConf_2_L, Teardown )
  3529        
  3607        
  3530     EUNIT_END_TEST_TABLE
  3608     EUNIT_END_TEST_TABLE
  3531 
  3609 
  3532 //  END OF FILE
  3610 //  END OF FILE