mmserv/radioutility/presetutility/tsrc/conf/PresetUtilityTestModule.cfg
branchRCL_3
changeset 46 0ac9a5310753
parent 45 095bea5f582e
child 50 999b2818a0eb
equal deleted inserted replaced
45:095bea5f582e 46:0ac9a5310753
     1 [Define]
       
     2 ChannelNameNull "EMPTYSTRING"
       
     3 ChannelFrequencyNull 0
       
     4 ChannelUrlNull "EMPTYSTRING"
       
     5 ChannelName0 "Radio Pop"
       
     6 ChannelFrequency0 104000000
       
     7 ChannelUrl0 "www.radiopop.fi"
       
     8 ChannelName1 "Radio Soul"
       
     9 ChannelFrequency1 97500000
       
    10 ChannelUrl1 "www.radiosoul.fi"
       
    11 ChannelName2 "Radio Rock"
       
    12 ChannelFrequency2 91300000
       
    13 ChannelUrl2 "www.radiorock.fi"
       
    14 ChannelName3 "Radio Humppa"
       
    15 ChannelFrequency3 11300000
       
    16 ChannelUrl3 "www.radiohumppa.fi"
       
    17 KErrNotFound				-1
       
    18 KErrGeneral                 -2
       
    19 KErrArgument				-6
       
    20 KErrDiskFull				-26
       
    21 KErrBadTestParameter		-1000
       
    22 KErrEventPending			-2000
       
    23 KErrCallbackErrorCode		-2001
       
    24 KErrUnexpectedValue			-2002
       
    25 KExpectedFrequencyChange	-2003
       
    26 KErrTimeoutController		-2007
       
    27 [Enddefine]
       
    28 
       
    29 [Test]
       
    30 title Example
       
    31 create PresetUtilityTestModule PresetUtility
       
    32 PresetUtility Example pa ra me ters
       
    33 delete PresetUtility
       
    34 [Endtest] 
       
    35 
       
    36 // Preset Utility API functions' tests
       
    37 
       
    38 [Test]
       
    39 title 1.1 Create PresetUtility
       
    40 create PresetUtilityTestModule PresetUtility
       
    41 PresetUtility CreatePresetUtility Preset
       
    42 PresetUtility DestroyPresetUtility
       
    43 delete PresetUtility
       
    44 [Endtest]
       
    45 
       
    46 [Test]
       
    47 title 1.1a OOM for creation of PresetUtility
       
    48 create PresetUtilityTestModule PresetUtility
       
    49 oomignorefailure ON
       
    50 loop 9
       
    51 oomheapfailnext LOOP_COUNTER
       
    52 PresetUtility CreatePresetUtility Preset
       
    53 print LOOP_COUNTER
       
    54 endloop
       
    55 oomignorefailure OFF
       
    56 oomheaptonormal
       
    57 PresetUtility DestroyPresetUtility
       
    58 delete PresetUtility
       
    59 [Endtest]
       
    60 
       
    61 [Test]
       
    62 title 1.2 Get current and max number of preset channels
       
    63 create PresetUtilityTestModule PresetUtility
       
    64 PresetUtility CreatePresetUtility Preset
       
    65 PresetUtility PresetCount 2
       
    66 allownextresult 100
       
    67 PresetUtility MaxNumberOfPresets
       
    68 PresetUtility DestroyPresetUtility
       
    69 delete PresetUtility
       
    70 [Endtest]
       
    71 
       
    72 [Test]
       
    73 title 1.3 Get preset channels 1 and 2
       
    74 create PresetUtilityTestModule PresetUtility
       
    75 PresetUtility CreatePresetUtility Preset
       
    76 PresetUtility ReadPresetL 0 ChannelName0 ChannelFrequency0 ChannelUrl0
       
    77 PresetUtility ReadPresetL 1 ChannelName1 ChannelFrequency1 ChannelUrl1
       
    78 PresetUtility DestroyPresetUtility
       
    79 delete PresetUtility
       
    80 [Endtest]
       
    81 
       
    82 [Test]
       
    83 title 1.4 Get first preset channels
       
    84 create PresetUtilityTestModule PresetUtility
       
    85 PresetUtility CreatePresetUtility Preset
       
    86 PresetUtility FirstPreset 0
       
    87 PresetUtility DestroyPresetUtility
       
    88 delete PresetUtility
       
    89 [Endtest]
       
    90 
       
    91 [Test]
       
    92 title 1.5 Get next preset channels
       
    93 create PresetUtilityTestModule PresetUtility
       
    94 PresetUtility CreatePresetUtility Preset
       
    95 PresetUtility NextPreset 0 1
       
    96 PresetUtility DestroyPresetUtility
       
    97 delete PresetUtility
       
    98 [Endtest]
       
    99 
       
   100 [Test]
       
   101 title 1.5a Set and delete preset channels x
       
   102 create PresetUtilityTestModule PresetUtility
       
   103 PresetUtility CreatePresetUtility Preset
       
   104 allownextresult 2
       
   105 PresetUtility SavePresetL -1 ChannelName2 ChannelFrequency2 ChannelUrl2
       
   106 PresetUtility DeletePreset 2
       
   107 PresetUtility DestroyPresetUtility
       
   108 delete PresetUtility
       
   109 [Endtest]
       
   110 
       
   111 [Test]
       
   112 title 1.5b Read unexisting preset channels x
       
   113 create PresetUtilityTestModule PresetUtility
       
   114 PresetUtility CreatePresetUtility Preset
       
   115 allowerrorcodes KErrArgument
       
   116 PresetUtility ReadPresetL 101 ChannelName2 ChannelFrequency2 ChannelUrl2
       
   117 PresetUtility DestroyPresetUtility
       
   118 delete PresetUtility
       
   119 [Endtest]
       
   120 
       
   121 [Test]
       
   122 title 1.6 Save, Get and Delete preset channels 2 and 3
       
   123 create PresetUtilityTestModule PresetUtility
       
   124 PresetUtility CreatePresetUtility Preset
       
   125 allownextresult 2
       
   126 PresetUtility SavePresetL 2 ChannelName2 ChannelFrequency2 ChannelUrl2
       
   127 allownextresult 3
       
   128 PresetUtility SavePresetL 3 ChannelName3 ChannelFrequency3 ChannelUrl3
       
   129 PresetUtility ReadPresetL 2 ChannelName2 ChannelFrequency2 ChannelUrl2
       
   130 PresetUtility ReadPresetL 3 ChannelName3 ChannelFrequency3 ChannelUrl3
       
   131 PresetUtility DeletePreset 2
       
   132 PresetUtility DeletePreset 3
       
   133 PresetUtility ReadPresetL 0 ChannelName0 ChannelFrequency0 ChannelUrl0
       
   134 PresetUtility ReadPresetL 1 ChannelName1 ChannelFrequency1 ChannelUrl1
       
   135 allowerrorcodes KErrUnexpectedValue KErrNotFound
       
   136 PresetUtility ReadPresetL 2 ChannelName2 ChannelFrequency2 ChannelUrl2
       
   137 allowerrorcodes KErrUnexpectedValue KErrNotFound
       
   138 PresetUtility ReadPresetL 3 ChannelName3 ChannelFrequency3 ChannelUrl3
       
   139 PresetUtility DestroyPresetUtility
       
   140 delete PresetUtility
       
   141 [Endtest]
       
   142 
       
   143 [Test]
       
   144 title 1.7 Save preset channels 3 and 4, delete all 
       
   145 create PresetUtilityTestModule PresetUtility
       
   146 PresetUtility CreatePresetUtility Preset
       
   147 allownextresult 2
       
   148 PresetUtility SavePresetL 2 ChannelName2 ChannelFrequency2 ChannelUrl2
       
   149 allownextresult 3
       
   150 PresetUtility SavePresetL 3 ChannelName3 ChannelFrequency3 ChannelUrl3
       
   151 PresetUtility ReadPresetL 2 ChannelName2 ChannelFrequency2 ChannelUrl2
       
   152 PresetUtility ReadPresetL 3 ChannelName3 ChannelFrequency3 ChannelUrl3
       
   153 PresetUtility DeletePreset -1
       
   154 allowerrorcodes KErrUnexpectedValue KErrNotFound
       
   155 PresetUtility ReadPresetL 0 ChannelName0 ChannelFrequency0 ChannelUrl0
       
   156 allowerrorcodes KErrUnexpectedValue KErrNotFound
       
   157 PresetUtility ReadPresetL 1 ChannelName1 ChannelFrequency1 ChannelUrl1
       
   158 allowerrorcodes KErrUnexpectedValue KErrNotFound
       
   159 PresetUtility ReadPresetL 2 ChannelName2 ChannelFrequency2 ChannelUrl2
       
   160 allowerrorcodes KErrUnexpectedValue KErrNotFound
       
   161 PresetUtility ReadPresetL 3 ChannelName3 ChannelFrequency3 ChannelUrl3
       
   162 PresetUtility DestroyPresetUtility
       
   163 delete PresetUtility
       
   164 [Endtest]
       
   165 
       
   166 [Test]
       
   167 title 1.7a Try to delete unexisting channel 
       
   168 create PresetUtilityTestModule PresetUtility
       
   169 PresetUtility CreatePresetUtility Preset
       
   170 allowerrorcodes KErrArgument
       
   171 PresetUtility DeletePreset 3
       
   172 PresetUtility DestroyPresetUtility
       
   173 delete PresetUtility
       
   174 [Endtest]
       
   175 
       
   176 [Test]
       
   177 title 1.8 Try to read from an unexisting and also from an illegal preset index.
       
   178 create PresetUtilityTestModule PresetUtility
       
   179 PresetUtility CreatePresetUtility Preset
       
   180 allowerrorcodes KErrNotFound
       
   181 PresetUtility ReadPresetL 44 ChannelNameNull ChannelFrequencyNull ChannelUrlNull
       
   182 allowerrorcodes KErrArgument
       
   183 PresetUtility ReadPresetL 100 ChannelNameNull ChannelFrequencyNull ChannelUrlNull
       
   184 PresetUtility DestroyPresetUtility
       
   185 delete PresetUtility
       
   186 [Endtest]
       
   187 
       
   188 [Test]
       
   189 title 1.9 OOM test for SavePresetL.
       
   190 create PresetUtilityTestModule PresetUtility
       
   191 PresetUtility CreatePresetUtility Preset
       
   192 oomignorefailure ON
       
   193 loop 7
       
   194 oomheapfailnext LOOP_COUNTER
       
   195 PresetUtility SavePresetL 3 ChannelName3 ChannelFrequency3 ChannelUrl3
       
   196 print LOOP_COUNTER
       
   197 endloop
       
   198 oomignorefailure OFF
       
   199 oomheaptonormal
       
   200 PresetUtility DeletePreset 3
       
   201 PresetUtility DestroyPresetUtility
       
   202 delete PresetUtility
       
   203 [Endtest]
       
   204 
       
   205 [Test]
       
   206 title 1.10 OOM test for ReadPresetL.
       
   207 create PresetUtilityTestModule PresetUtility
       
   208 PresetUtility CreatePresetUtility Preset
       
   209 allownextresult 3
       
   210 PresetUtility SavePresetL 3 ChannelName3 ChannelFrequency3 ChannelUrl3
       
   211 oomignorefailure ON
       
   212 loop 6
       
   213 oomheapfailnext LOOP_COUNTER
       
   214 PresetUtility ReadPresetL 3 ChannelName3 ChannelFrequency3 ChannelUrl3
       
   215 print LOOP_COUNTER
       
   216 endloop
       
   217 oomignorefailure OFF
       
   218 oomheaptonormal
       
   219 PresetUtility DeletePreset 3
       
   220 PresetUtility DestroyPresetUtility
       
   221 delete PresetUtility
       
   222 [Endtest]
       
   223 
       
   224 [Test]
       
   225 title 1.11 OOM test for DeletePreset.
       
   226 create PresetUtilityTestModule PresetUtility
       
   227 PresetUtility CreatePresetUtility Preset
       
   228 allownextresult 3
       
   229 PresetUtility SavePresetL 3 ChannelName3 ChannelFrequency3 ChannelUrl3
       
   230 oomignorefailure ON
       
   231 loop 2
       
   232 oomheapfailnext LOOP_COUNTER
       
   233 PresetUtility DeletePreset -1
       
   234 print LOOP_COUNTER
       
   235 endloop
       
   236 oomignorefailure OFF
       
   237 oomheaptonormal
       
   238 PresetUtility DeletePreset -1
       
   239 PresetUtility DestroyPresetUtility
       
   240 delete PresetUtility
       
   241 [Endtest]
       
   242 
       
   243 [Test]
       
   244 title 1.12 Add maximum number of presets
       
   245 create PresetUtilityTestModule PresetUtility
       
   246 PresetUtility CreatePresetUtility Preset
       
   247 PresetUtility DeletePreset -1
       
   248 loop 10
       
   249 print LOOP_COUNTER
       
   250 allownextresult 1 2 3 4 5 6 7 8 9 0 
       
   251 PresetUtility SavePresetL -1 ChannelName1 ChannelFrequency1
       
   252 endloop
       
   253 loop 10
       
   254 print LOOP_COUNTER
       
   255 allownextresult 11 12 13 14 15 16 17 18 19 10 
       
   256 PresetUtility SavePresetL -1 ChannelName1 ChannelFrequency1
       
   257 endloop
       
   258 loop 10
       
   259 print LOOP_COUNTER
       
   260 allownextresult 21 22 23 24 25 26 27 28 29 20 
       
   261 PresetUtility SavePresetL -1 ChannelName1 ChannelFrequency1
       
   262 endloop
       
   263 loop 10
       
   264 print LOOP_COUNTER
       
   265 allownextresult 31 32 33 34 35 36 37 38 39 30 
       
   266 PresetUtility SavePresetL -1 ChannelName1 ChannelFrequency1
       
   267 endloop
       
   268 loop 10
       
   269 print LOOP_COUNTER
       
   270 allownextresult 41 42 43 44 45 46 47 48 49 40
       
   271 PresetUtility SavePresetL -1 ChannelName1 ChannelFrequency1
       
   272 endloop
       
   273 loop 10
       
   274 print LOOP_COUNTER
       
   275 allownextresult 51 52 53 54 55 56 57 58 59 50 
       
   276 PresetUtility SavePresetL -1 ChannelName1 ChannelFrequency1
       
   277 endloop
       
   278 loop 10
       
   279 print LOOP_COUNTER
       
   280 allownextresult 61 62 63 64 65 66 67 68 69 60 
       
   281 PresetUtility SavePresetL -1 ChannelName1 ChannelFrequency1
       
   282 endloop
       
   283 loop 10
       
   284 print LOOP_COUNTER
       
   285 allownextresult 71 72 73 74 75 76 77 78 79 70 
       
   286 PresetUtility SavePresetL -1 ChannelName1 ChannelFrequency1
       
   287 endloop
       
   288 loop 10
       
   289 print LOOP_COUNTER
       
   290 allownextresult 81 82 83 84 85 86 87 88 89 80 
       
   291 PresetUtility SavePresetL -1 ChannelName1 ChannelFrequency1
       
   292 endloop
       
   293 loop 10
       
   294 print LOOP_COUNTER
       
   295 allownextresult 91 92 93 94 95 96 97 98 99 90
       
   296 PresetUtility SavePresetL -1 ChannelName1 ChannelFrequency1
       
   297 endloop
       
   298 allowerrorcodes KErrArgument KErrDiskFull
       
   299 PresetUtility SavePresetL 100 ChannelName2 ChannelFrequency2
       
   300 oomignorefailure ON
       
   301 loop 3
       
   302 oomheapfailnext LOOP_COUNTER
       
   303 allowerrorcodes KErrArgument KErrDiskFull
       
   304 PresetUtility SavePresetL -1 ChannelName1 ChannelFrequency1
       
   305 PresetUtility DeletePreset 50
       
   306 print LOOP_COUNTER
       
   307 endloop
       
   308 oomignorefailure OFF
       
   309 oomheaptonormal
       
   310 oomignorefailure ON
       
   311 loop 3
       
   312 oomheapfailnext LOOP_COUNTER
       
   313 PresetUtility DeletePreset -1
       
   314 print LOOP_COUNTER
       
   315 endloop
       
   316 oomignorefailure OFF
       
   317 oomheaptonormal
       
   318 PresetUtility DeletePreset -1
       
   319 PresetUtility DestroyPresetUtility
       
   320 delete PresetUtility
       
   321 [Endtest]
       
   322 
       
   323 
       
   324 // TRadioPreset class tests 2.1 -->
       
   325 
       
   326 [Test]
       
   327 title 2.1 TRadioPreset, Set and Get PI code
       
   328 create PresetUtilityTestModule FmPresetUtility
       
   329 FmPresetUtility CreateRadioPresetL
       
   330 FmPresetUtility SetPiCode 7
       
   331 FmPresetUtility PiCode 7
       
   332 FmPresetUtility SetPiCode 0
       
   333 FmPresetUtility PiCode 0
       
   334 FmPresetUtility DestroyRadioPreset
       
   335 delete FmPresetUtility
       
   336 [Endtest]
       
   337 
       
   338 [Test]
       
   339 title 2.2 TRadioPreset, Set and Get PTY
       
   340 create PresetUtilityTestModule FmPresetUtility
       
   341 FmPresetUtility CreateRadioPresetL
       
   342 FmPresetUtility SetGenre 7
       
   343 FmPresetUtility Genre 7
       
   344 FmPresetUtility SetGenre 0
       
   345 FmPresetUtility Genre 0
       
   346 FmPresetUtility DestroyRadioPreset
       
   347 delete FmPresetUtility
       
   348 [Endtest]
       
   349 
       
   350 [Test]
       
   351 title 2.3 TRadioPreset, Set and Get favourite status
       
   352 create PresetUtilityTestModule FmPresetUtility
       
   353 FmPresetUtility CreateRadioPresetL
       
   354 FmPresetUtility SetFavorite 1
       
   355 FmPresetUtility Favorite 1
       
   356 FmPresetUtility SetFavorite 0
       
   357 FmPresetUtility Favorite 0
       
   358 FmPresetUtility SetFavorite 1100
       
   359 FmPresetUtility Favorite 1
       
   360 FmPresetUtility DestroyRadioPreset
       
   361 delete FmPresetUtility
       
   362 [Endtest]
       
   363 
       
   364 [Test]
       
   365 title 2.4 TRadioPreset, Set and Get the local station information.
       
   366 create PresetUtilityTestModule FmPresetUtility
       
   367 FmPresetUtility CreateRadioPresetL
       
   368 FmPresetUtility SetLocalStation 1
       
   369 FmPresetUtility LocalStation 1
       
   370 FmPresetUtility SetLocalStation 5612
       
   371 FmPresetUtility LocalStation 1
       
   372 FmPresetUtility SetLocalStation 0
       
   373 FmPresetUtility LocalStation 0
       
   374 FmPresetUtility DestroyRadioPreset
       
   375 delete FmPresetUtility
       
   376 [Endtest]
       
   377 
       
   378 [Test]
       
   379 title 2.5 TRadioPreset, Set and Get the user rename information.
       
   380 create PresetUtilityTestModule FmPresetUtility
       
   381 FmPresetUtility CreateRadioPresetL
       
   382 FmPresetUtility SetRenamedByUser 1
       
   383 FmPresetUtility RenamedByUser 1
       
   384 FmPresetUtility SetRenamedByUser 1100
       
   385 FmPresetUtility RenamedByUser 1
       
   386 FmPresetUtility SetRenamedByUser 0
       
   387 FmPresetUtility RenamedByUser 0
       
   388 FmPresetUtility DestroyRadioPreset
       
   389 delete FmPresetUtility
       
   390 [Endtest]
       
   391 
       
   392 // Deprecating Fm Preset Utility API functions' tests
       
   393 
       
   394 [Test]
       
   395 title 3.1 Create FmPresetUtility
       
   396 create PresetUtilityTestModule FmPresetUtility
       
   397 FmPresetUtility CreateFmPresetUtility Preset
       
   398 FmPresetUtility DeletePresetL -1
       
   399 FmPresetUtility GetNumberOfPresets 0
       
   400 FmPresetUtility SetPresetL 0 ChannelName0 ChannelFrequency0
       
   401 FmPresetUtility SetPresetL 1 ChannelName1 ChannelFrequency1
       
   402 FmPresetUtility SetPresetUrlL 0 ChannelUrl0
       
   403 FmPresetUtility SetPresetUrlL 1 ChannelUrl1
       
   404 FmPresetUtility DestroyFmPresetUtility
       
   405 delete FmPresetUtility
       
   406 [Endtest]
       
   407 
       
   408 [Test]
       
   409 title 3.2 Get current and max number of presets
       
   410 create PresetUtilityTestModule FmPresetUtility
       
   411 FmPresetUtility CreateFmPresetUtility Preset
       
   412 FmPresetUtility GetNumberOfPresets 2
       
   413 allownextresult 100
       
   414 FmPresetUtility GetMaxNumberOfPresets
       
   415 FmPresetUtility DestroyFmPresetUtility
       
   416 delete FmPresetUtility
       
   417 [Endtest]
       
   418 
       
   419 [Test]
       
   420 title 3.3 Get presets 0 an 1
       
   421 create PresetUtilityTestModule FmPresetUtility
       
   422 FmPresetUtility CreateFmPresetUtility Preset
       
   423 FmPresetUtility GetPresetL 0 ChannelName0 ChannelFrequency0
       
   424 FmPresetUtility GetPresetL 1 ChannelName1 ChannelFrequency1
       
   425 FmPresetUtility DestroyFmPresetUtility
       
   426 delete FmPresetUtility
       
   427 [Endtest]
       
   428 
       
   429 [Test]
       
   430 title 3.4 Get first preset
       
   431 create PresetUtilityTestModule FmPresetUtility
       
   432 FmPresetUtility CreateFmPresetUtility Preset
       
   433 FmPresetUtility GetFirstPresetL 0
       
   434 FmPresetUtility DestroyFmPresetUtility
       
   435 delete FmPresetUtility
       
   436 [Endtest]
       
   437 
       
   438 [Test]
       
   439 title 3.5 Get next preset
       
   440 create PresetUtilityTestModule FmPresetUtility
       
   441 FmPresetUtility CreateFmPresetUtility Preset
       
   442 FmPresetUtility GetNextPresetL 0 1
       
   443 FmPresetUtility DestroyFmPresetUtility
       
   444 delete FmPresetUtility
       
   445 [Endtest]
       
   446 
       
   447 [Test]
       
   448 title 3.6 Set and delete preset x
       
   449 create PresetUtilityTestModule FmPresetUtility
       
   450 FmPresetUtility CreateFmPresetUtility Preset
       
   451 allowerrorcodes KErrArgument
       
   452 FmPresetUtility SetPresetL -1 ChannelName2 ChannelFrequency2
       
   453 allowerrorcodes KErrArgument
       
   454 FmPresetUtility DeletePresetL 2
       
   455 FmPresetUtility DestroyFmPresetUtility
       
   456 delete FmPresetUtility
       
   457 [Endtest]
       
   458 
       
   459 [Test]
       
   460 title 3.7 Read unexisting preset x
       
   461 create PresetUtilityTestModule FmPresetUtility
       
   462 FmPresetUtility CreateFmPresetUtility Preset
       
   463 allowerrorcodes KErrArgument KErrNotFound
       
   464 FmPresetUtility GetPresetL 100 ChannelName2 ChannelFrequency2
       
   465 FmPresetUtility DestroyFmPresetUtility
       
   466 delete FmPresetUtility
       
   467 [Endtest]
       
   468 
       
   469 [Test]
       
   470 title 3.8 Save, Get and Delete presets 2 and 3
       
   471 create PresetUtilityTestModule FmPresetUtility
       
   472 FmPresetUtility CreateFmPresetUtility Preset
       
   473 FmPresetUtility SetPresetL 2 ChannelName2 ChannelFrequency2
       
   474 FmPresetUtility SetPresetL 3 ChannelName3 ChannelFrequency3
       
   475 FmPresetUtility GetPresetL 2 ChannelName2 ChannelFrequency2
       
   476 FmPresetUtility GetPresetL 3 ChannelName3 ChannelFrequency3
       
   477 FmPresetUtility DeletePresetL 2
       
   478 FmPresetUtility DeletePresetL 3
       
   479 FmPresetUtility GetPresetL 0 ChannelName0 ChannelFrequency0
       
   480 FmPresetUtility GetPresetL 1 ChannelName1 ChannelFrequency1
       
   481 allowerrorcodes KErrUnexpectedValue KErrNotFound
       
   482 FmPresetUtility GetPresetL 2 ChannelName2 ChannelFrequency2
       
   483 allowerrorcodes KErrUnexpectedValue KErrNotFound
       
   484 FmPresetUtility GetPresetL 3 ChannelName3 ChannelFrequency3
       
   485 FmPresetUtility DestroyFmPresetUtility
       
   486 delete FmPresetUtility
       
   487 [Endtest]
       
   488 
       
   489 [Test]
       
   490 title 3.9 Save presets 2 and 3, delete all 
       
   491 create PresetUtilityTestModule FmPresetUtility
       
   492 FmPresetUtility CreateFmPresetUtility Preset
       
   493 FmPresetUtility SetPresetL 2 ChannelName2 ChannelFrequency2
       
   494 FmPresetUtility SetPresetL 3 ChannelName3 ChannelFrequency3
       
   495 FmPresetUtility GetPresetL 2 ChannelName2 ChannelFrequency2
       
   496 FmPresetUtility GetPresetL 3 ChannelName3 ChannelFrequency3
       
   497 FmPresetUtility DeletePresetL -1
       
   498 allowerrorcodes KErrUnexpectedValue KErrNotFound
       
   499 FmPresetUtility GetPresetL 0 ChannelName0 ChannelFrequency0
       
   500 allowerrorcodes KErrUnexpectedValue KErrNotFound
       
   501 FmPresetUtility GetPresetL 1 ChannelName1 ChannelFrequency1
       
   502 allowerrorcodes KErrUnexpectedValue KErrNotFound
       
   503 FmPresetUtility GetPresetL 2 ChannelName2 ChannelFrequency2
       
   504 allowerrorcodes KErrUnexpectedValue KErrNotFound
       
   505 FmPresetUtility GetPresetL 3 ChannelName3 ChannelFrequency3
       
   506 FmPresetUtility DestroyFmPresetUtility
       
   507 delete FmPresetUtility
       
   508 [Endtest]
       
   509 
       
   510 [Test]
       
   511 title 3.10 Try to delete unexisting preset
       
   512 create PresetUtilityTestModule FmPresetUtility
       
   513 FmPresetUtility CreateFmPresetUtility Preset
       
   514 allowerrorcodes KErrArgument
       
   515 FmPresetUtility DeletePresetL 3
       
   516 FmPresetUtility DestroyFmPresetUtility
       
   517 delete FmPresetUtility
       
   518 [Endtest]
       
   519 
       
   520 [Test]
       
   521 title 3.11 Set and Get PI code
       
   522 create PresetUtilityTestModule FmPresetUtility
       
   523 FmPresetUtility CreateFmPresetUtility Preset
       
   524 FmPresetUtility SetPresetL 2 ChannelName2 ChannelFrequency2
       
   525 FmPresetUtility SetPresetPICodeL 2 7
       
   526 FmPresetUtility GetPresetPICodeL 2 7
       
   527 FmPresetUtility SetPresetPICodeL 2 0
       
   528 FmPresetUtility GetPresetPICodeL 2 0
       
   529 FmPresetUtility DeletePresetL 2
       
   530 FmPresetUtility DestroyFmPresetUtility
       
   531 delete FmPresetUtility
       
   532 [Endtest]
       
   533 
       
   534 [Test]
       
   535 title 3.12 Set and Get favourite status
       
   536 create PresetUtilityTestModule FmPresetUtility
       
   537 FmPresetUtility CreateFmPresetUtility Preset
       
   538 FmPresetUtility SetPresetL 2 ChannelName2 ChannelFrequency2
       
   539 FmPresetUtility SetPresetFavouriteInfoL 2 1
       
   540 FmPresetUtility GetPresetFavouriteInfoL 2 1
       
   541 FmPresetUtility SetPresetFavouriteInfoL 2 0
       
   542 FmPresetUtility GetPresetFavouriteInfoL 2 0
       
   543 FmPresetUtility DeletePresetL 2
       
   544 FmPresetUtility DestroyFmPresetUtility
       
   545 delete FmPresetUtility
       
   546 [Endtest]
       
   547 
       
   548 [Test]
       
   549 title 3.12a Set and Get favourite status. Setting with >1 value.
       
   550 create PresetUtilityTestModule FmPresetUtility
       
   551 FmPresetUtility CreateFmPresetUtility Preset
       
   552 FmPresetUtility SetPresetL 2 ChannelName2 ChannelFrequency2
       
   553 FmPresetUtility SetPresetFavouriteInfoL 2 2
       
   554 FmPresetUtility GetPresetFavouriteInfoL 2 1
       
   555 FmPresetUtility SetPresetFavouriteInfoL 2 1100
       
   556 FmPresetUtility GetPresetFavouriteInfoL 2 1
       
   557 FmPresetUtility SetPresetFavouriteInfoL 2 0
       
   558 FmPresetUtility GetPresetFavouriteInfoL 2 0
       
   559 FmPresetUtility DeletePresetL 2
       
   560 FmPresetUtility DestroyFmPresetUtility
       
   561 delete FmPresetUtility
       
   562 [Endtest]
       
   563 
       
   564 [Test]
       
   565 title 3.12b Try to set and get an unexisting preset with specified favourite.
       
   566 create PresetUtilityTestModule FmPresetUtility
       
   567 FmPresetUtility CreateFmPresetUtility Preset
       
   568 allowerrorcodes KErrNotFound
       
   569 FmPresetUtility SetPresetFavouriteInfoL 10 1
       
   570 allowerrorcodes KErrNotFound
       
   571 FmPresetUtility GetPresetFavouriteInfoL 11 0
       
   572 FmPresetUtility DestroyFmPresetUtility
       
   573 delete FmPresetUtility
       
   574 [Endtest]
       
   575 
       
   576 [Test]
       
   577 title 3.13 Set and Get the preset with specified user rename information.
       
   578 create PresetUtilityTestModule FmPresetUtility
       
   579 FmPresetUtility CreateFmPresetUtility Preset
       
   580 FmPresetUtility SetPresetL 3 ChannelName3 ChannelFrequency3
       
   581 FmPresetUtility SetPresetUserRenameInfoL 3 1
       
   582 FmPresetUtility GetPresetUserRenameInfoL 3 1
       
   583 FmPresetUtility SetPresetUserRenameInfoL 3 0
       
   584 FmPresetUtility GetPresetUserRenameInfoL 3 0
       
   585 FmPresetUtility DeletePresetL 3
       
   586 FmPresetUtility DestroyFmPresetUtility
       
   587 delete FmPresetUtility
       
   588 [Endtest]
       
   589 
       
   590 [Test]
       
   591 title 3.13a Set and Get the preset with specified user rename information. Setting with >1 value.
       
   592 create PresetUtilityTestModule FmPresetUtility
       
   593 FmPresetUtility CreateFmPresetUtility Preset
       
   594 FmPresetUtility SetPresetL 3 ChannelName3 ChannelFrequency3
       
   595 FmPresetUtility SetPresetUserRenameInfoL 3 2
       
   596 FmPresetUtility GetPresetUserRenameInfoL 3 1
       
   597 FmPresetUtility SetPresetUserRenameInfoL 3 15
       
   598 FmPresetUtility GetPresetUserRenameInfoL 3 1
       
   599 FmPresetUtility SetPresetUserRenameInfoL 3 0
       
   600 FmPresetUtility GetPresetUserRenameInfoL 3 0
       
   601 FmPresetUtility DeletePresetL 3
       
   602 FmPresetUtility DestroyFmPresetUtility
       
   603 delete FmPresetUtility
       
   604 [Endtest]
       
   605 
       
   606 [Test]
       
   607 title 3.13b Try to set and get an unexisting preset with specified user rename information.
       
   608 create PresetUtilityTestModule FmPresetUtility
       
   609 FmPresetUtility CreateFmPresetUtility Preset
       
   610 allowerrorcodes KErrNotFound
       
   611 FmPresetUtility SetPresetUserRenameInfoL 10 1
       
   612 allowerrorcodes KErrNotFound
       
   613 FmPresetUtility GetPresetUserRenameInfoL 11 0
       
   614 FmPresetUtility DestroyFmPresetUtility
       
   615 delete FmPresetUtility
       
   616 [Endtest]
       
   617 
       
   618 [Test]
       
   619 title 3.14 Set and Get the preset with specified channel PTY (genre).
       
   620 create PresetUtilityTestModule FmPresetUtility
       
   621 FmPresetUtility CreateFmPresetUtility Preset
       
   622 FmPresetUtility SetPresetL 3 ChannelName3 ChannelFrequency3
       
   623 FmPresetUtility SetPresetPtyL 3 8
       
   624 FmPresetUtility GetPresetPtyL 3 8
       
   625 FmPresetUtility SetPresetPtyL 3 0
       
   626 FmPresetUtility GetPresetPtyL 3 0
       
   627 FmPresetUtility DeletePresetL 3
       
   628 FmPresetUtility DestroyFmPresetUtility
       
   629 delete FmPresetUtility
       
   630 [Endtest]
       
   631 
       
   632 [Test]
       
   633 title 3.15 Set and Get preset with specified URL.
       
   634 create PresetUtilityTestModule FmPresetUtility
       
   635 FmPresetUtility CreateFmPresetUtility Preset
       
   636 FmPresetUtility SetPresetL 3 ChannelName3 ChannelFrequency3
       
   637 FmPresetUtility SetPresetUrlL 3 ChannelUrl3
       
   638 FmPresetUtility GetPresetUrlL 3 ChannelUrl3
       
   639 FmPresetUtility SetPresetUrlL 3 ChannelUrl1
       
   640 allowerrorcodes KErrUnexpectedValue
       
   641 FmPresetUtility GetPresetUrlL 3 ChannelUrl2
       
   642 FmPresetUtility GetPresetUrlL 3 ChannelUrl1
       
   643 FmPresetUtility DeletePresetL 3
       
   644 FmPresetUtility DestroyFmPresetUtility
       
   645 delete FmPresetUtility
       
   646 [Endtest]
       
   647 
       
   648 [Test]
       
   649 title 3.16 Set preset x, Set name to empty and frequency to 0, try to get URL, UserRenameInfo and FavouriteInfo.
       
   650 create PresetUtilityTestModule FmPresetUtility
       
   651 FmPresetUtility CreateFmPresetUtility Preset
       
   652 FmPresetUtility SetPresetL 2 ChannelName2 ChannelFrequency2
       
   653 FmPresetUtility SetPresetUrlL 2 ChannelUrl2
       
   654 FmPresetUtility GetPresetNameL 2 ChannelName2
       
   655 FmPresetUtility GetPresetFrequencyL 2 ChannelFrequency2
       
   656 FmPresetUtility GetPresetUrlL 2 ChannelUrl2
       
   657 FmPresetUtility SetPresetL 1 ChannelName1 ChannelFrequency1
       
   658 FmPresetUtility GetPresetUrlL 2 ChannelUrl2
       
   659 FmPresetUtility SetPresetL 2 ChannelNameNull ChannelFrequencyNull
       
   660 FmPresetUtility GetPresetUrlL 2 ChannelUrlNull
       
   661 FmPresetUtility SetPresetUserRenameInfoL 2 0
       
   662 FmPresetUtility GetPresetFavouriteInfoL 2 0
       
   663 FmPresetUtility GetPresetNameL 2 ChannelNameNull
       
   664 FmPresetUtility GetPresetFrequencyL 2 ChannelFrequencyNull
       
   665 FmPresetUtility DeletePresetL 2
       
   666 FmPresetUtility DestroyFmPresetUtility
       
   667 delete FmPresetUtility
       
   668 [Endtest]
       
   669 
       
   670 [Test]
       
   671 title 3.17 Try to get a frequency from an unexisting and also from an illegal preset index.
       
   672 create PresetUtilityTestModule FmPresetUtility
       
   673 FmPresetUtility CreateFmPresetUtility Preset
       
   674 allowerrorcodes KErrNotFound
       
   675 FmPresetUtility GetPresetFrequencyL 44 ChannelFrequencyNull
       
   676 allowerrorcodes KErrArgument
       
   677 FmPresetUtility GetPresetFrequencyL 101 ChannelFrequencyNull
       
   678 FmPresetUtility DestroyFmPresetUtility
       
   679 delete FmPresetUtility
       
   680 [Endtest]
       
   681 
       
   682 [Test]
       
   683 title 3.18 OOM Set and delete preset
       
   684 create PresetUtilityTestModule FmPresetUtility
       
   685 FmPresetUtility CreateFmPresetUtility Preset
       
   686 oomignorefailure ON
       
   687 loop 3
       
   688 oomheapfailnext LOOP_COUNTER
       
   689 FmPresetUtility SetPresetL 2 ChannelName2 ChannelFrequency2
       
   690 print LOOP_COUNTER
       
   691 endloop
       
   692 oomignorefailure OFF
       
   693 oomheaptonormal
       
   694 FmPresetUtility DeletePresetL 2
       
   695 FmPresetUtility DestroyFmPresetUtility
       
   696 delete FmPresetUtility
       
   697 [Endtest]
       
   698