mmsharing/mmshengine/tsrc/ut_engine/src/ut_musenguriparser.cpp
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
    23 #include "mussettingskeys.h"
    23 #include "mussettingskeys.h"
    24 #include "mussettings.h"
    24 #include "mussettings.h"
    25 
    25 
    26 //  SYSTEM INCLUDES
    26 //  SYSTEM INCLUDES
    27 #include <digia/eunit/eunitmacros.h>
    27 #include <digia/eunit/eunitmacros.h>
    28 #include <e32property.h>
    28 
    29 
    29 
    30 
    30 
    31 // -----------------------------------------------------------------------------
    31 // -----------------------------------------------------------------------------
    32 //
    32 //
    33 // -----------------------------------------------------------------------------
    33 // -----------------------------------------------------------------------------
    99 //
    99 //
   100 // -----------------------------------------------------------------------------
   100 // -----------------------------------------------------------------------------
   101 //
   101 //
   102 void UT_TMusEngUriParser::Teardown()
   102 void UT_TMusEngUriParser::Teardown()
   103     {
   103     {
   104     MultimediaSharingSettings::SetOperatorVariantSettingL(
   104     
   105                              MusSettingsKeys::EStandard );
       
   106     PropertyHelper::Close();
       
   107     }
   105     }
   108 
   106 
   109 
   107 
   110 
   108 
   111 // TEST CASES
   109 // TEST CASES
   245         
   243         
   246     // Unsuccessful case, random string
   244     // Unsuccessful case, random string
   247     parser.iUri = KTestRecipientRandomText8();
   245     parser.iUri = KTestRecipientRandomText8();
   248     TRAPD( error, parser.ParseUriL() );
   246     TRAPD( error, parser.ParseUriL() );
   249     MUS_TEST_FORWARD_ALLOC_FAILURE( error );
   247     MUS_TEST_FORWARD_ALLOC_FAILURE( error );
   250     EUNIT_ASSERT_EQUALS( error, KErrArgument );
   248     EUNIT_ASSERT_EQUALS( error, KErrCorrupt );
   251     
   249     
   252     // Unsuccessful case, tel prefix and at sign present
   250     // Unsuccessful case, tel prefix and at sign present
   253     parser.iUri = KTestRecipientTelUriWithAtSign8();
   251     parser.iUri = KTestRecipientTelUriWithAtSign8();
   254     TRAP( error, parser.ParseUriL() );
   252     TRAP( error, parser.ParseUriL() );
   255     MUS_TEST_FORWARD_ALLOC_FAILURE( error );
   253     MUS_TEST_FORWARD_ALLOC_FAILURE( error );