serviceproviders/sapi_contacts_vpbk/tsrc/dev/tcontactsgetidsprovidertest/conf/tcontactsgetidsprovidertest.cfg
changeset 22 fc9cf246af83
child 24 f4292e0e20df
equal deleted inserted replaced
19:989d2f495d90 22:fc9cf246af83
       
     1 /*  ===========================================================================
       
     2  *  Copyright © 2006-2007 Nokia Corporation.
       
     3  *  This material, including documentation and any related
       
     4  *  computer programs, is protected by copyright controlled by
       
     5  *  Nokia Corporation. All rights are reserved. Copying,
       
     6  *  including reproducing, storing, adapting or translating, any
       
     7  *  or all of this material requires the prior written consent of
       
     8  *  Nokia Corporation. This material also contains confidential
       
     9  *  information which may not be disclosed to others without the
       
    10  *  prior written consent of Nokia Corporation.
       
    11  * ============================================================================
       
    12  
       
    13  
       
    14 NOTE:
       
    15 1. NULL input means not passing any value for the placeholder
       
    16 2. NULLVALUE means a NULL is passed as value to the placeholder
       
    17 3. "NULL" as input to a parameter means a Null string or a string of value "NULL" is passed as input
       
    18 4. All the fields in input is mandatory, if no value is to be passed for any field, a value NULL can be passed. And if NULL is to be passed as value, then 
       
    19 	value "NULLVALUE" needs to be passed.
       
    20 5. The key-value pair in Expected output can be in any order and all are optional.
       
    21 
       
    22 
       
    23 //Testcase format:
       
    24 //Description of the testcase
       
    25 //Input: Input values
       
    26 //Expected:(+ve/-ve case) Expected output or behaviour 
       
    27 [Test]
       
    28 title Sample
       
    29 create tcontactsgetidsprovidertest foobar
       
    30 //foobar GetIdsL <Type> <DBUri> <SearchVal> <SortOrder> <expected error code> 
       
    31 foobar GetIdsL Contact cntdb:\/\/c:contacts.cdb NULL NULL Ascending 0
       
    32 delete foobar
       
    33 [Endtest]
       
    34 
       
    35 */
       
    36 
       
    37 ############################################### Test cases starts ###############################################
       
    38 
       
    39 //Get the ids without passing any input
       
    40 //Input: No input. Note here NULL value refers to nothing being passed
       
    41 //Expected: errorcode 1003-MissingArgument error is expected as Type input is mandatory
       
    42 [Test]
       
    43 title GetIdsNoInput
       
    44 create tcontactsgetidsprovidertest foobar
       
    45 foobar GetIdsL NULL NULL NULL NULL 1003
       
    46 delete foobar
       
    47 [Endtest]
       
    48 
       
    49 //GetIds with type as the only input and Contact as value for Type
       
    50 //Input: Contact as value for Type and no other values are passed
       
    51 //Expected: zero as error code is expected
       
    52 [Test]
       
    53 title GetIdsValidTypeAlone1
       
    54 create tcontactsgetidsprovidertest foobar
       
    55 foobar GetIdsL Contact NULL NULL NULL 0
       
    56 delete foobar
       
    57 [Endtest]
       
    58 
       
    59 //GetIds with valid input Group for type and type as the only input. This returns the list of ids of all groups
       
    60 //Input: Group as value for Type and no other values are passed
       
    61 //Expected: zero as error code is expected
       
    62 [Test]
       
    63 title GetIdsValidTypeAlone2
       
    64 create tcontactsgetidsprovidertest foobar
       
    65 foobar GetIdsL Group NULL NULL NULL 0
       
    66 delete foobar
       
    67 [Endtest]
       
    68 
       
    69 //Getids with value Database which is valid for getLIst as input for Type
       
    70 //Input: Database as value for Type and no other values are passed
       
    71 //Expected: non-zero error code is expected
       
    72 [Test]
       
    73 title GetIdsDatabaseAsType
       
    74 create tcontactsgetidsprovidertest foobar
       
    75 foobar GetIdsL Database NULL NULL NULL 1002 //1004
       
    76 delete foobar
       
    77 [Endtest]
       
    78 
       
    79 //getids with a valid string value like Dummy as value for Type
       
    80 //Input: Dummy as value for Type and no other values are passed
       
    81 //Expected: 1002 errorcode- BadArgumentType error is expected
       
    82 [Test]
       
    83 title GetIdsDummyType
       
    84 create tcontactsgetidsprovidertest foobar
       
    85 foobar GetIdsL Dummy NULL NULL NULL 1002
       
    86 delete foobar
       
    87 [Endtest]
       
    88 
       
    89 //getids with a value of type other than string like an integer value 12 as value for type
       
    90 //Input: 12 as value for Type and no other values are passed
       
    91 //Expected: 1002 errorcode- BadArgumentType error is expected
       
    92 [Test]
       
    93 title GetIdsIntegerType
       
    94 create tcontactsgetidsprovidertest foobar
       
    95 foobar GetIdsL 12 NULL NULL NULL 1002
       
    96 delete foobar
       
    97 [Endtest]
       
    98 
       
    99 //getids with a huge string with more than 255 characters as value for type
       
   100 //Input: a huge string with more than 255 characters as value for Type and no other values are passed
       
   101 //Expected: 1002 errorcode- BadArgumentType error is expected
       
   102 [Test]
       
   103 title GetIdsHugeStringAsType
       
   104 create tcontactsgetidsprovidertest foobar
       
   105 foobar GetIdsL abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz NULL NULL NULL 1002
       
   106 delete foobar
       
   107 [Endtest]
       
   108 
       
   109 //getids with null asvalue for Type
       
   110 //Input: NULLVALUE as value for Type and no other values are passed
       
   111 //Expected: 1002 errorcode- MissingArgument error is expected
       
   112 [Test]
       
   113 title GetIdsNullType
       
   114 create tcontactsgetidsprovidertest foobar
       
   115 foobar GetIdsL NULLVALUE NULL NULL NULL 1002
       
   116 delete foobar
       
   117 [Endtest]
       
   118 
       
   119 //getids with a valid value cntdb://c:contacts.cdb as value for DBUri, with Type as Contact
       
   120 //Expected: zero errorcode
       
   121 [Test]
       
   122 title GetIdsPhoneDBUri
       
   123 create tcontactsgetidsprovidertest foobar
       
   124 foobar GetIdsL Contact cntdb:\/\/c:contacts.cdb NULL NULL 0
       
   125 delete foobar
       
   126 [Endtest]
       
   127 
       
   128 //getids with a valid value sim://global_adn as value for DBUri, with Type as Contact
       
   129 //Expected: zero errorcode
       
   130 [Test]
       
   131 title GetIdsSimDBUri
       
   132 create tcontactsgetidsprovidertest foobar
       
   133 foobar GetIdsL Contact sim:\/\/global_adn NULL NULL 0
       
   134 delete foobar
       
   135 [Endtest]
       
   136 
       
   137 //getids with a valid value cntdb://c:contacts.cdb as value for DBUri, with Type as Group
       
   138 //Expected: zero errorcode
       
   139 [Test]
       
   140 title GetIdsPhoneDBUriGrpType
       
   141 create tcontactsgetidsprovidertest foobar
       
   142 foobar GetIdsL Group cntdb:\/\/c:contacts.cdb NULL NULL 0
       
   143 delete foobar
       
   144 [Endtest]
       
   145 
       
   146 //getids with a valid value sim://global_adn as value for DBUri, with Type as Group
       
   147 //Expected: 1012-ServiceNotsupported as errorcode
       
   148 [Test]
       
   149 title GetIdsSimDBUriGrpType
       
   150 create tcontactsgetidsprovidertest foobar
       
   151 foobar GetIdsL Group sim:\/\/global_adn NULL NULL 1012
       
   152 delete foobar
       
   153 [Endtest]
       
   154 
       
   155 //getids with a value cntda://c:contacts.cda as value for DBUri and Contact as value for Type
       
   156 //Expected: 1014-BadArgumentType as errorcode
       
   157 [Test]
       
   158 title GetIdsInvalidDBUri
       
   159 create tcontactsgetidsprovidertest foobar
       
   160 foobar GetIdsL Contact cntda:\/\/c:contacts.cda NULL NULL 1014
       
   161 delete foobar
       
   162 [Endtest]
       
   163 
       
   164 //getids with an empty string as value for DBUri
       
   165 //Expected: 1014-BadArgumentType as errorcode
       
   166 [Test]
       
   167 title GetIdsEmptyStringDBUri
       
   168 create tcontactsgetidsprovidertest foobar
       
   169 foobar GetIdsL Contact "" NULL NULL 1014
       
   170 delete foobar
       
   171 [Endtest]
       
   172 
       
   173 //getids with a null value for DBUri
       
   174 //Expected: 0 as errorcode
       
   175 [Test]
       
   176 title GetIdsNullDBUri
       
   177 create tcontactsgetidsprovidertest foobar
       
   178 foobar GetIdsL Contact NULLVALUE NULL NULL 0
       
   179 delete foobar
       
   180 [Endtest]
       
   181 
       
   182 //getids with an integer value 12 for DBUri
       
   183 //Expected: 1014-BadArgumentType as errorcode
       
   184 [Test]
       
   185 title GetIdsIntegerDBUri
       
   186 create tcontactsgetidsprovidertest foobar
       
   187 foobar GetIdsL Contact 12 NULL NULL 1014
       
   188 delete foobar
       
   189 [Endtest]
       
   190 
       
   191 
       
   192 //getids with a huge string with more than 255 characters as value for DBUri
       
   193 //Expected: 1002-BadArgumentType as errorcode
       
   194 [Test]
       
   195 title GetIdsHugeStringDBUri
       
   196 create tcontactsgetidsprovidertest foobar
       
   197 foobar GetIdsL Contact abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz  NULL NULL 1002 
       
   198 delete foobar
       
   199 [Endtest]
       
   200 
       
   201 //getids with a valid string value for searchval and Type as Contact and cntdb://c:contacts.cdb as DBUri
       
   202 //Expected: zero errorcode
       
   203 [Test]
       
   204 title GetIdsValidSrchVal
       
   205 create tcontactsgetidsprovidertest foobar
       
   206 foobar GetIdsL Contact cntdb:\/\/c:contacts.cdb Arnold NULL 0 
       
   207 delete foobar
       
   208 [Endtest]
       
   209 
       
   210 //getids with a valid string value for searchval and Type as Group and cntdb://c:contacts.cdb as DBUri
       
   211 //Expected: zero errorcode
       
   212 [Test]
       
   213 title GetIdsValidSrchValForGrpType
       
   214 create tcontactsgetidsprovidertest foobar
       
   215 foobar GetIdsL Group cntdb:\/\/c:contacts.cdb Group1 NULL 0
       
   216 delete foobar
       
   217 [Endtest]
       
   218 
       
   219 //getids with a valid string value for searchval and Type as Contact and sim://global_adn as DBUri
       
   220 //Expected: 1012 errorcode
       
   221 [Test]
       
   222 title GetIdsValidSrchValForSimDbCntType
       
   223 create tcontactsgetidsprovidertest foobar
       
   224 foobar GetIdsL Contact sim:\/\/global_adn Bob NULL 1012
       
   225 delete foobar
       
   226 [Endtest]
       
   227 
       
   228 //getids with a valid string value for SearchVal which does not result in any output. Give the search for the contact which does not exist
       
   229 //Expected: 1012 errorcode
       
   230 [Test]
       
   231 title GetIdsValidNotExistSrchVal
       
   232 create tcontactsgetidsprovidertest foobar
       
   233 foobar GetIdsL Contact cntdb:\/\/c:contacts.cdb NotExists NULL 1012
       
   234 delete foobar
       
   235 [Endtest]
       
   236 
       
   237 //getids with an integer value for searchval input
       
   238 //Expected: 1012 errorcode
       
   239 [Test]
       
   240 title GetIdsIntegerSrchVal
       
   241 create tcontactsgetidsprovidertest foobar
       
   242 foobar GetIdsL Contact cntdb:\/\/c:contacts.cdb 12 NULL 1012
       
   243 delete foobar
       
   244 [Endtest]
       
   245 
       
   246 //getids with a null value for searchval input and other inputs having valid values
       
   247 //Expected: 0 errorcode
       
   248 [Test]
       
   249 title GetIdsNullSrchVal
       
   250 create tcontactsgetidsprovidertest foobar
       
   251 foobar GetIdsL Contact cntdb:\/\/c:contacts.cdb NULLVALUE NULL 0
       
   252 delete foobar
       
   253 [Endtest]
       
   254 
       
   255 //getids with a long string with more than 255 characters as value for searchval input
       
   256 //Expected: 1012 errorcode
       
   257 [Test]
       
   258 title GetIdsHugeStringSrchVal
       
   259 create tcontactsgetidsprovidertest foobar
       
   260 foobar GetIdsL Contact cntdb:\/\/c:contacts.cdb abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz NULL 1012
       
   261 delete foobar
       
   262 [Endtest]
       
   263 
       
   264 //getids with an empty string as value for searchVal input
       
   265 //Expected: 1012 errorcode
       
   266 [Test]
       
   267 title GetIdsEmptyStringSrchVal
       
   268 create tcontactsgetidsprovidertest foobar
       
   269 foobar GetIdsL Contact cntdb:\/\/c:contacts.cdb "" NULL 1012
       
   270 delete foobar
       
   271 [Endtest]
       
   272 
       
   273 //Get the ids of all contacts in the phone database in ascending order
       
   274 //Input: Contact as Type, cntdb:\/\/c:contacts.cdb as DBUri and Ascending as sort order
       
   275 //Expected: errorcode 0 is expected
       
   276 [Test]
       
   277 title GetIdsAllContactsInPhone
       
   278 create tcontactsgetidsprovidertest foobar
       
   279 foobar GetIdsL Contact cntdb:\/\/c:contacts.cdb NULL Ascending 0
       
   280 delete foobar
       
   281 [Endtest]
       
   282 
       
   283 //get the ids of all contacts in phone database in descending order
       
   284 //Input: Contact as Type, cntdb:\/\/c:contacts.cdb as DBUri and Descending as sort order
       
   285 //Expected: errorcode 0 is expected
       
   286 [Test]
       
   287 title GetIdsDescOrderPhoneDB
       
   288 create tcontactsgetidsprovidertest foobar
       
   289 foobar GetIdsL Contact cntdb:\/\/c:contacts.cdb NULL Descending 0
       
   290 delete foobar
       
   291 [Endtest]
       
   292 
       
   293 //get the ids of all contacts in sim database in ascending order
       
   294 //Input: Contact as Type, sim:\/\/global_adn as DBUri and Ascending as sort order
       
   295 //Expected: errorcode 0 is expected
       
   296 [Test]
       
   297 title GetIdsAscOrderSimDB
       
   298 create tcontactsgetidsprovidertest foobar
       
   299 foobar GetIdsL Contact sim:\/\/global_adn NULL Ascending 0
       
   300 delete foobar
       
   301 [Endtest]
       
   302 
       
   303 
       
   304 //get the ids of all contacts in sim database in descending order
       
   305 //Input: Contact as Type, sim:\/\/global_adn as DBUri and Descending as sort order
       
   306 //Expected: errorcode 0 is expected
       
   307 [Test]
       
   308 title GetIdsDescOrderSimDB
       
   309 create tcontactsgetidsprovidertest foobar
       
   310 foobar GetIdsL Contact sim:\/\/global_adn NULL Descending 0
       
   311 delete foobar
       
   312 [Endtest]
       
   313 
       
   314 //get the ids by passing a valid sort order and Type value as Group
       
   315 //Input: Group as Type, nothing passed as DBUri and Descending as sort order
       
   316 //Expected: errorcode 0 is expected
       
   317 [Test]
       
   318 title GetIdsDescOrderGrp
       
   319 create tcontactsgetidsprovidertest foobar
       
   320 foobar GetIdsL Group NULL NULL Descending 0
       
   321 delete foobar
       
   322 [Endtest]
       
   323 
       
   324 //get the ids by passing null as value for sort order
       
   325 //Input: Contact as Type, nothing passed as DBUri and NULLVALUE as sort order
       
   326 //Expected: errorcode 1002 is expected
       
   327 [Test]
       
   328 title GetIdsNullOrder
       
   329 create tcontactsgetidsprovidertest foobar
       
   330 foobar GetIdsL Contact NULL NULL NULLVALUE 1002
       
   331 delete foobar
       
   332 [Endtest]
       
   333 
       
   334 //get the ids of all contacts by passing an integer value 12 as value for sort order
       
   335 //Input: Contact as Type, nothing passed as DBUri and 12 as sort order
       
   336 //Expected: errorcode 1002 is expected
       
   337 [Test]
       
   338 title GetIdsIntegerOrder
       
   339 create tcontactsgetidsprovidertest foobar
       
   340 foobar GetIdsL Contact NULL NULL 12 1002
       
   341 delete foobar
       
   342 [Endtest]
       
   343 
       
   344 //get the ids of all contacts by passing a long string of more than 255 characters as value for sort order
       
   345 //Input: Contact as Type, nothing passed as DBUri and string with more than 255 characters as sort order
       
   346 //Expected: errorcode 1002 is expected
       
   347 [Test]
       
   348 title GetIdsHugeStringOrder
       
   349 create tcontactsgetidsprovidertest foobar
       
   350 foobar GetIdsL Contact NULL NULL abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz 1002
       
   351 delete foobar
       
   352 [Endtest]
       
   353 
       
   354 //get the ids by passing an empty string as value for sort order
       
   355 //Input: Contact as Type, nothing passed as DBUri and empty string as sort order
       
   356 //Expected: errorcode 1002 is expected
       
   357 [Test]
       
   358 title GetIdsEmptyStringOrder
       
   359 create tcontactsgetidsprovidertest foobar
       
   360 foobar GetIdsL Contact NULL NULL "" 1002
       
   361 delete foobar
       
   362 [Endtest]
       
   363 ################################################################    End     ############################################################