//##############################################################################
//#                                                                            #
//#                STIF Test suite for Predictive Search Engine                #
//#                --------------------------------------------                #
//#                                                                            #
//# Initially designed for ITUT keyboard.                                      #
//# Some tests are adapted for N97 which has a 3x11 keyboard.                  #
//#                                                                            #
//# TC_ITU: Test Case for ITUT keyboard.                                       #
//# TC_N97: Test Case for N97 3x11 keyboard.                                   #
//#                                                                            #
//# NOTES:                                                                     #
//#                                                                            #
//# - In the ITUT keyboard the "0" and the " " are on the same key.            #
//#   Therefore if some clients deliver a "0" in Itut (or predictive) mode,    #
//#   then the "0" has the double nature of a "0" and of a " " (separator).    #
//#                                                                            #
//# - In the N97 3x11 keyboard the "0" and the " " are different keys.         #
//#   Therefore if some clients deliver a "0" in Itut (or predictive) mode,    #
//#   then the "0" has the single nature of a "0" (not a separator).           #
//#                                                                            #
//# - The test driver for SearchOnInputString, TC_ITU_SearchOnInputString      #
//#   and TC_N97_SearchOnInputString is identical.                             #
//#   The naming is different in order to comment/uncomment the test cases     #
//#   more easily.                                                             #
//#                                                                            #
//# - The test driver for TestSearchingInCache, TC_ITU_TestSearchingInCache    #
//#   and TC_N97_TestSearchingInCache is identical.                            #
//#   The naming is different in order to comment/uncomment the test cases     #
//#   more easily.                                                             #
//#                                                                            #
//##############################################################################


//------------------------------------------------------------------------------
//					Initial Set Up ("SU")
//						- Server startup
//						- Contacts/groups creation
//						- Initial sort order
//------------------------------------------------------------------------------


//******************************************************************************
[Test]
title SU: Start Up the Server
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[6,EItut,EAlphaSort,5]" "RES[0,]"
delete api
[Endtest]


//******************************************************************************
[Test]
title SU: Create contacts in phone memory
create PsClientTestSuite api
api WriteTitleToLog
api CreateContactsInPhone "CreateContacts[16,(FN:0Nick,LN:0Jack,CN:0Sam)(FN:@ravi four,LN:!belkud five)(FN:ravi kiran,LN:velkud,CN:Nokia)(FN:mahesh,LN:doraiswamy,CN:Nokia)(FN:+allen,LN:good,CN:Nokia)(FN:a0r,LN:pqr,CN:Nokia)(FN:chiru,LN:devi,CN:motorola)(FN:a b c d e f g Jay,LN:L Gee,CN:Nokia India)(FN:Lpcsillet,LN:Lpcsucy,CN:Lpcsush)(FN:John,LN:Tom,CN:Nokia)(FN:Tim,LN:Jones,CN:Nokia)(FN:M0hn,LN:Time,CN:Nokia)(FN:Pcs,LN:,CN:)(FN:yz,LN:123,CN:Nokia)(FN:Ästrid,LN:Öhlm,CN:Åppres),(FN:4four,LN:&ampli,CN:Nokia)]" "URI[cntdb:\/\/c:contacts.cdb]"
delete api
[Endtest]


//******************************************************************************
[Test]
title SU: Add a group and contacts in the group
create PsClientTestSuite api
api WriteTitleToLog
api ADDGroups "AddGroups[TheGroup,3,(FN:abc,LN:def,CN:Nokia)(FN:ghi,LN:jkl,CN:Nokia)(FN:mno,LN:pqr TheGr,CN:Nokia)]"
delete api
[Endtest]


//******************************************************************************
// The following test case sets Name-Surname order - Keep in this position
[Test]
title SU: Change Sort Order to Name-Surname
create PsClientTestSuite api
api WriteTitleToLog
api TestSortOrder "URI[cntdb:\/\/c:contacts.cdb]" "SORTORDER[6,4,27]"
delete api
[Endtest]


//------------------------------------------------------------------------------
//					TestDataOrder ("DO")
//------------------------------------------------------------------------------


//******************************************************************************
[Test]
title DO: Test for contacts
create PsClientTestSuite api
api WriteTitleToLog
api TestDataOrder "URI[cntdb:\/\/c:contacts.cdb]"
delete api
[Endtest]


//******************************************************************************
[Test]
title DO: Test for groups
create PsClientTestSuite api
api WriteTitleToLog
api TestDataOrder "URI[cntdb:\/\/c:contacts.gdb]"
delete api
[Endtest]


//******************************************************************************
[Test]
title DO: Test for wrong URI
create PsClientTestSuite api
api WriteTitleToLog
api TestDataOrderForErrL "URI[cntdb:\/\/c:wrongcontactsuri.cdb]"
delete api
[Endtest]


//******************************************************************************
[Test]
title DO: Test for group with group ID
create PsClientTestSuite api
api WriteTitleToLog
api TestDataOrder "URI[cntdb:\/\/c:contacts.gdb?id=3221]"
delete api
[Endtest]


//------------------------------------------------------------------------------
//					ConvertToVpbkLink ("VL")
//------------------------------------------------------------------------------


//******************************************************************************
[Test]
title VL: ConvertToVpbkLink - Test for contacts
create PsClientTestSuite api
api WriteTitleToLog
api ConvertToVpbkLink "URI[cntdb:\/\/c:contacts.cdb]"
delete api
[Endtest]

//******************************************************************************
[Test]
title VL: ConvertToVpbkLink - Test for groups
create PsClientTestSuite api
api WriteTitleToLog
api ConvertToVpbkLink "URI[cntdb:\/\/c:contacts.gdb]"
delete api
[Endtest]


//------------------------------------------------------------------------------
//					CheckLanguageSupport ("LS")
//------------------------------------------------------------------------------


//******************************************************************************
[Test]
title LS: Check Language Support (1)
create PsClientTestSuite api
api WriteTitleToLog
api CheckLanguageSupport "LANG[1,ETrue]"
delete api
[Endtest]


//******************************************************************************
[Test]
title LS: Check Language Support (2)
create PsClientTestSuite api
api WriteTitleToLog
api CheckLanguageSupport "LANG[32,EFalse]"
delete api
[Endtest]


//------------------------------------------------------------------------------
//					SearchOnInputString ("IS")
//------------------------------------------------------------------------------


//******************************************************************************
[Test]
title IS: Single word (Itut)
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_SearchOnInputString "IPSTR[Adam]" "SQ[23,EItut,EPatternSort,5]" "RES[1,(-1:AD)]" "MATCHLOC[0:2]"
//api TC_N97_SearchOnInputString "IPSTR[Adam]" "SQ[@-,EItut,EPatternSort,5]" "RES[1,(-1:AD)]" "MATCHLOC[0:2]"
delete api
[Endtest]


//******************************************************************************
[Test]
title IS: Multi Search (Itut)
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_SearchOnInputString "IPSTR[Adam Dory Dusk]" "SQ[20303,EItut,EPatternSort,5]" "RES[1,(-1:A,-1:D)]" "MATCHLOC[0:1,5:1,10:1]"
//api TC_N97_SearchOnInputString "IPSTR[Adam Dory Dusk]" "SQ[@ D -,EItut,EPatternSort,5]" "RES[1,(-1:A,-1:D)]" "MATCHLOC[0:1,5:1,10:1]"
delete api
[Endtest]


//******************************************************************************
[Test]
title IS: Single word (Qwerty)
create PsClientTestSuite api
api WriteTitleToLog
api SearchOnInputString "IPSTR[Hull]" "SQ[hu,EQwerty,EPatternSort,5]" "RES[1,(-1:HU)]" "MATCHLOC[0:2]"
delete api
[Endtest]


//******************************************************************************
[Test]
title IS: Multi Search (Qwerty)
create PsClientTestSuite api
api WriteTitleToLog
api SearchOnInputString "IPSTR[Gill Monk]" "SQ[m g,EQwerty,EAlphaSort,5]" "RES[1,(-1:G,-1:M)]" "MATCHLOC[0:1,5:1]"
delete api
[Endtest]


//******************************************************************************
[Test]
title IS: Single word (Mixed)
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_SearchOnInputString "IPSTR[Xen]" "SQ[9e,iq,EPatternSort,5]" "RES[1,(-1:XE)]" "MATCHLOC[0:2]"
//api TC_N97_SearchOnInputString "IPSTR[Xen]" "SQ[)e,iq,EPatternSort,5]" "RES[1,(-1:XE)]" "MATCHLOC[0:2]"
delete api
[Endtest]


//******************************************************************************
[Test]
title IS: Multi Search (Mixed)
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_SearchOnInputString "IPSTR[Tim Monk]" "SQ[80m6,iiqi,EAlphaSort,5]" "RES[1,(-1:MO,-1:T)]" "MATCHLOC[0:1,4:2]"
//api TC_N97_SearchOnInputString "IPSTR[Tim Monk]" "SQ[5 m9,iiqi,EAlphaSort,5]" "RES[1,(-1:MO,-1:T)]" "MATCHLOC[0:1,4:2]"
delete api
[Endtest]


//******************************************************************************
[Test]
title IS: Single word (Itut) -> No result
create PsClientTestSuite api
api WriteTitleToLog
api SearchOnInputString "IPSTR[Adam]" "SQ[93,EItut,EPatternSort,5]" "RES[0,]" "MATCHLOC[]"
delete api
[Endtest]


//******************************************************************************
[Test]
title IS: Multi Search (Itut) -> Partial match (1)
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_SearchOnInputString "IPSTR[Adam Dory Dusk]" "SQ[202,EItut,EAlphaSort,5]" "RES[1,(-1:A)]" "MATCHLOC[0:1]"
//api TC_N97_SearchOnInputString "IPSTR[Adam Dory Dusk]" "SQ[@ @,EItut,EAlphaSort,5]" "RES[1,(-1:A)]" "MATCHLOC[0:1]"
delete api
[Endtest]


//******************************************************************************
[Test]
title IS: Multi Search (Itut) -> Partial match (2)
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_SearchOnInputString "IPSTR[Tim Monk]" "SQ[808,EItut,EAlphaSort,5]" "RES[1,(-1:T)]" "MATCHLOC[0:1]"
//api TC_N97_SearchOnInputString "IPSTR[Tim Monk]" "SQ[5 5,EItut,EAlphaSort,5]" "RES[1,(-1:T)]" "MATCHLOC[0:1]"
delete api
[Endtest]


//******************************************************************************
[Test]
title IS: Empty String (Itut) -> No result
create PsClientTestSuite api
api WriteTitleToLog
api SearchOnInputString "IPSTR[]" "SQ[23,EItut,EPatternSort,5]" "RES[0,]" "MATCHLOC[]"
delete api
[Endtest]


//******************************************************************************
[Test]
title IS: Only spaces string (Itut)- No result
create PsClientTestSuite api
api WriteTitleToLog
api SearchOnInputString "IPSTR[   ]" "SQ[23,EItut,EPatternSort,5]" "RES[0,]" "MATCHLOC[]"
delete api
[Endtest]


//------------------------------------------------------------------------------
//					SearchLookupMatchString ("LM")
//------------------------------------------------------------------------------

//******************************************************************************
[Test]
title LM: Trivial
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_SearchLookupMatchString "IPSTR[Abc Bc 123 c]" "SQ[222022,EItut,EPatternSort,5]" "RESSTR[Abc Bc]"
//api TC_N97_SearchLookupMatchString "IPSTR[Aa@ @A 123 a]" "SQ[aaa aa,EItut,EPatternSort,5]" "RESSTR[Aa@ @A]"
delete api
[Endtest]

//******************************************************************************
[Test]
title LM: Single backtrack
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_SearchLookupMatchString "IPSTR[Abc Bc 123 c]" "SQ[220222,EItut,EPatternSort,5]" "RESSTR[Bc Abc]"
//api TC_N97_SearchLookupMatchString "IPSTR[Aa@ @A 123 a]" "SQ[aa aaa,EItut,EPatternSort,5]" "RESSTR[@A Aa@]"
delete api
[Endtest]

//******************************************************************************
[Test]
title LM: Double backtrack
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_SearchLookupMatchString "IPSTR[Abc Bc 123 c]" "SQ[20220222,EItut,EPatternSort,5]" "RESSTR[c Bc Abc]"
//api TC_N97_SearchLookupMatchString "IPSTR[Aa@ @A 123 a]" "SQ[a aa aaa,EItut,EPatternSort,5]" "RESSTR[a @A Aa@]"
delete api
[Endtest]

//******************************************************************************
[Test]
title LM: Spaces in query and in result
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_SearchLookupMatchString "IPSTR[Abc Bc 123 c]" "SQ[ 22 1 2 ,EItut,EPatternSort,5]" "RESSTR[ Ab 1 B ]"
//api TC_N97_SearchLookupMatchString "IPSTR[Aa@ @A 123 a]" "SQ[ aa q a ,EItut,EPatternSort,5]" "RESSTR[ Aa 1 @ ]"
delete api
[Endtest]

//******************************************************************************
[Test]
title LM: Not matched
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_SearchLookupMatchString "IPSTR[Abc Bc 123 c]" "SQ[2222,EItut,EPatternSort,5]" "RESSTR[]"
//api TC_N97_SearchLookupMatchString "IPSTR[Aa@ @A 123 a]" "SQ[aaaa,EItut,EPatternSort,5]" "RESSTR[]"
delete api
[Endtest]

//------------------------------------------------------------------------------
//					GetAllContents ("AC")
//------------------------------------------------------------------------------


//******************************************************************************
[Test]
title AC: Get All contacts in the phonebook
create PsClientTestSuite api
api WriteTitleToLog
api GetAllContents "URI[cntdb:\/\/c:contacts.cdb]" "RES[19,(FN:Pcs,LN:,CN:)(FN:0Nick,LN:0Jack,CN:0Sam)(FN:yz,LN:123,CN:Nokia)(FN:@ravi four,LN:!belkud five)(FN:4four,LN:&ampli,CN:Nokia)(FN:abc,LN:def,CN:Nokia)(FN:chiru,LN:devi,CN:motorola)(FN:mahesh,LN:doraiswamy,CN:Nokia)(FN:+allen,LN:good,CN:Nokia)(FN:ghi,LN:jkl,CN:Nokia)(FN:Tim,LN:Jones,CN:Nokia)(FN:a b c d e f g Jay,LN:L Gee,CN:Nokia India)(FN:Lpcsillet,LN:Lpcsucy,CN:Lpcsush)(FN:a0r,LN:pqr,CN:Nokia)(FN:mno,LN:pqr TheGr,CN:Nokia)(FN:M0hn,LN:Time,CN:Nokia)(FN:John,LN:Tom,CN:Nokia)(FN:ravi kiran,LN:velkud,CN:Nokia)(FN:Ästrid,LN:Öhlm,CN:Åppres)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title AC: Get All contacts - Wrong URI -> No result
create PsClientTestSuite api
api WriteTitleToLog
api GetAllContents "URI[cntdb:\/\/c:wrongcontacts.cdb]" "RES[0,]"
delete api
[Endtest]


//------------------------------------------------------------------------------
//					TestSearchingInCache ("CS")
//------------------------------------------------------------------------------


//******************************************************************************
[Test]
title CS: Search by FirstName (Itut)
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[624374,EItut,EAlphaSort,5]" "RES[1,(FN:mahesh,LN:doraiswamy,CN:Nokia)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[!@H3/#,EItut,EAlphaSort,5]" "RES[1,(FN:mahesh,LN:doraiswamy,CN:Nokia)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Search by FirstName (Qwerty)
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[mahesh,EQwerty,EPatternSort,5]" "RES[1,(FN:mahesh,LN:doraiswamy,CN:Nokia)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Search by FirstName (Mixed)
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[62h3,iiqi,EPatternSort,5]" "RES[1,(FN:mahesh,LN:doraiswamy,CN:Nokia)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[!@h3,iiqi,EPatternSort,5]" "RES[1,(FN:mahesh,LN:doraiswamy,CN:Nokia)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Search by LastName (Itut)
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[3672479,EItut,EAlphaSort,5]" "RES[1,(FN:mahesh,LN:doraiswamy,CN:Nokia)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[-94@8/2,EItut,EAlphaSort,5]" "RES[1,(FN:mahesh,LN:doraiswamy,CN:Nokia)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Search by LastName (Qwerty)
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[doraiswamy,EQwerty,EPatternSort,8]" "RES[1,(FN:mahesh,LN:doraiswamy,CN:Nokia)]"
delete api
[Endtest]


//****************************************************************************
[Test]
title CS: Search by LastName (Mixed)
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[ve558,qqiii,EAlphaSort,5]" "RES[1,(FN:ravi kiran,LN:velkud,CN:Nokia)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[ve:;7,qqiii,EAlphaSort,5]" "RES[1,(FN:ravi kiran,LN:velkud,CN:Nokia)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Search by CompanyName (Itut)
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[66867,EItut,EAlphaSort,5]" "RES[1,(FN:chiru,LN:devi,CN:motorola)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[!9594,EItut,EAlphaSort,5]" "RES[1,(FN:chiru,LN:devi,CN:motorola)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Search by CompanyName (Qwerty)
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[motor,EQwerty,EPatternSort,8]" "RES[1,(FN:chiru,LN:devi,CN:motorola)]"
delete api
[Endtest]


//****************************************************************************
[Test]
title CS: Search by CompanyName (Mixed)
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[mo867,qqiii,EAlphaSort,5]" "RES[1,(FN:chiru,LN:devi,CN:motorola)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[mo594,qqiii,EAlphaSort,5]" "RES[1,(FN:chiru,LN:devi,CN:motorola)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Multiple words contact (Itut)
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[5472,EItut,EPatternSort,5]" "RES[1,(FN:ravi kiran,LN:velkud,CN:Nokia)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[;84@,EItut,EPatternSort,5]" "RES[1,(FN:ravi kiran,LN:velkud,CN:Nokia)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Multiple (very many) words contact (Itut)
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[529,EItut,EAlphaSort,5]" "RES[1,(FN:a b c d e f g Jay,LN:L Gee,CN:Nokia India)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[*@6,EItut,EAlphaSort,5]" "RES[1,(FN:a b c d e f g Jay,LN:L Gee,CN:Nokia India)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Multiple words contact with same initials (Itut)
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[5727,EItut,EPatternSort,5]" "RES[1,(FN:Lpcsillet,LN:Lpcsucy,CN:Lpcsush)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[:0%/,EItut,EPatternSort,5]" "RES[1,(FN:Lpcsillet,LN:Lpcsucy,CN:Lpcsush)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Multiple words contact with same initials (Qwerty)
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[lpcs,EQwerty,EAlphaSort,5]" "RES[1,(FN:Lpcsillet,LN:Lpcsucy,CN:Lpcsush)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Multiple words contact with same initials (Mixed)
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[l7c7,qiqi,EPatternSort,5]" "RES[1,(FN:Lpcsillet,LN:Lpcsucy,CN:Lpcsush)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[l0c/,qiqi,EPatternSort,5]" "RES[1,(FN:Lpcsillet,LN:Lpcsucy,CN:Lpcsush)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Multi Search (Itut)
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[44055,EItut,EAlphaSort,5]" "RES[1,(FN:ghi,LN:jkl,CN:Nokia)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[=# *;,EItut,EAlphaSort,5]" "RES[1,(FN:ghi,LN:jkl,CN:Nokia)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Multi Search (Itut) - Space as sep
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[8 56,EItut,EAlphaSort,5]" "RES[2,(FN:Tim,LN:Jones,CN:Nokia)(FN:John,LN:Tom,CN:Nokia)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[5 *9,EItut,EAlphaSort,5]" "RES[2,(FN:Tim,LN:Jones,CN:Nokia)(FN:John,LN:Tom,CN:Nokia)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Multi Search (Itut) - 0 as sep
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[8056,EItut,EAlphaSort,5]" "RES[2,(FN:Tim,LN:Jones,CN:Nokia)(FN:John,LN:Tom,CN:Nokia)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[50*9,EItut,EAlphaSort,5]" "RES[0,]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Multi Search (Itut) - 0 and space as sep
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[80 56,EItut,EAlphaSort,5]" "RES[2,(FN:Tim,LN:Jones,CN:Nokia)(FN:John,LN:Tom,CN:Nokia)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[50 *9,EItut,EAlphaSort,5]" "RES[0,]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Multi Search (Qwerty) - Space as sep
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[j t,EQwerty,EAlphaSort,5]" "RES[2,(FN:Tim,LN:Jones,CN:Nokia)(FN:John,LN:Tom,CN:Nokia)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Multi Search (Qwerty) - 0 as NON sep (Qwerty 0)
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[j0t,EQwerty,EAlphaSort,5]" "RES[0,]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[j0t,EQwerty,EAlphaSort,5]" "RES[0,]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Multi Search (Mixed) mode - Space as sep
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[j6 8i,qiqiq,EPatternSort,5]" "RES[1,(FN:Tim,LN:Jones,CN:Nokia)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[j9 5i,qiqiq,EPatternSort,5]" "RES[1,(FN:Tim,LN:Jones,CN:Nokia)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Multi Search (Mixed) - 0 as sep
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[j608i,qiiiq,EAlphaSort,5]" "RES[1,(FN:Tim,LN:Jones,CN:Nokia)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[j905i,qiiiq,EAlphaSort,5]" "RES[0,]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Multi Search (Mixed) - 0 as NON sep (Qwerty 0)
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[j608i,qiqiq,EAlphaSort,5]" "RES[0,]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[j905i,qiqiq,EAlphaSort,5]" "RES[0,]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Multi Search (Mixed) - 0 and space as sep
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[j60 8i,qiiiiq,EAlphaSort,5]" "RES[1,(FN:Tim,LN:Jones,CN:Nokia)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[j90 5i,qiiiiq,EAlphaSort,5]" "RES[0,]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Multi Search (Itut) -> more than one result
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[807,EItut,EPatternSort,5]" "RES[2,(FN:ravi kiran,LN:velkud,CN:Nokia)(FN:mno,LN:pqr TheGr,CN:Nokia)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[& 4,EItut,EPatternSort,5]" "RES[2,(FN:ravi kiran,LN:velkud,CN:Nokia)(FN:4four,LN:&ampli,CN:Nokia)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Search Contact starting with + (Itut)
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[+25536,EItut,EAlphaSort,5]" "RES[1,(FN:+allen,LN:good,CN:Nokia)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[+@::3?,EItut,EAlphaSort,5]" "RES[1,(FN:+allen,LN:good,CN:Nokia)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Search contact starting with + (Qwerty)
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[+allen,EQwerty,EPatternSort,5]" "RES[1,(FN:+allen,LN:good,CN:Nokia)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Multi Search with + (Itut)
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[+0+,EItut,EAlphaSort,5]" "RES[1,(FN:@ravi four,LN:!belkud five)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[+ +,EItut,EAlphaSort,5]" "RES[1,(FN:@ravi four,LN:!belkud five)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Multi Search (Itut) -> No result
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[209,EItut,EAlphaSort,5]" "RES[0,]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Multi Search (Itut) - Query with more than 2 words
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[805606,EItut,EAlphaSort,5]" "RES[2,(FN:Tim,LN:Jones,CN:Nokia)(FN:John,LN:Tom,CN:Nokia)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[5 *9 ?,EItut,EAlphaSort,5]" "RES[2,(FN:Tim,LN:Jones,CN:Nokia)(FN:John,LN:Tom,CN:Nokia)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Search (Itut) -> No result
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[42423262374,EItut,EAlphaSort,5]" "RES[0,]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Search (Qwerty) -> No result
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[deepakrsrs,EQwerty,EPatternSort,5]" "RES[0,]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Search (Mixed) -> No result
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[dee789srs,qqqiiiqqq,EAlphaSort,5]" "RES[0,]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Multi Search (Itut) -> No result
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[4242 3262374,EItut,EPatternSort,5]" "RES[0,]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Multi Search (Qwerty) -> No result
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[deepa krsrs,EQwerty,EAlphaSort,5]" "RES[0,]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Multi Search (Mixed) -> No result
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[dee78 9srs,qqqiiiiqqq,EPatternSort,5]" "RES[0,]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Wrong URI (Itut) -> No result
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingInCache "URI[cntdb:\/\/c:Wronguricontacts.cdb]" "SQ[5,EItut,EAlphaSort,5]" "RES[0,]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Wrong URI (Itut) -> No result
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingInCache "URI[cntdb:\/\/c:Wronguricontacts.cdb]" "SQ[t,EQwerty,EAlphaSort,5]" "RES[0,]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Wrong URI (Mixed) -> No result
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingInCache "URI[cntdb:\/\/c:Wronguricontacts.cdb]" "SQ[dee7809srs,qqqiiiiqqq,EPatternSort,5]" "RES[0,]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Filter Display Fields (Itut)
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "DISP[28]" "SQ[624374,EItut,EPatternSort,5]" "RES[0,]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Filter Display Fields (Qwerty)
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "DISP[28]" "SQ[mahesh,EQwerty,EPatternSort,5]" "RES[0,]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Filter Display Fields (Mixed)
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "DISP[28]" "SQ[ma43sh,qqiiqq,EPatternSort,5]" "RES[0,]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Multi Search (Qwerty) - Filter Display Fields
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "DISP[28]" "SQ[ravi velkud,EQwerty,EAlphaSort,5]" "RES[0,]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Groups Search (Itut)
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.gdb]" "SQ[8434768,EItut,EPatternSort,5]" "RES[1,(FN:TheGroup)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.gdb]" "SQ[5#3=497,EItut,EPatternSort,5]" "RES[1,(FN:TheGroup)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Groups Search (Qwerty)
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingInCache "URI[cntdb:\/\/c:contacts.gdb]" "SQ[TheGrou,EQwerty,EPatternSort,5]" "RES[1,(FN:TheGroup)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Groups Search (Mixed)
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.gdb]" "SQ[843g7o8,iiiqiqi,EAlphaSort,5]" "RES[1,(FN:TheGroup)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.gdb]" "SQ[5#3g4o7,iiiqiqi,EAlphaSort,5]" "RES[1,(FN:TheGroup)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Search in more than one group -> No result
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingInCache "URI[cntdb:\/\/c:contacts.gdb?id=3221,cntdb:\/\/c:contacts.gdb?id=1132]" "SQ[624374,EItut,EPatternSort,5]" "RES[0,]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Search in non-existing group ID -> No result
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingInCache "URI[cntdb:\/\/c:contacts.gdb?id=3221]" "SQ[624374,EItut,EPatternSort,5]" "RES[0,]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Multi Search (Itut) Scandinavian chars - space as sep 
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[Ä78 Ö,EItut,EAlphaSort,5]" "RES[1,(FN:Ästrid,LN:Öhlm,CN:Åppres)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[Ä/5 Ö,EItut,EAlphaSort,5]" "RES[1,(FN:Ästrid,LN:Öhlm,CN:Åppres)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Search special chars - Pattern Sort
create PsClientTestSuite api
api WriteTitleToLog
// The following test is not really applicable test for non-ITUT keyboard
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[1,EItut,EPatternSort,5]" "RES[4,(FN:@ravi four,LN:!belkud five)(FN:yz,LN:123,CN:Nokia)(FN:+allen,LN:good,CN:Nokia)(FN:4four,LN:&ampli,CN:Nokia)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[! @,EItut,EPatternSort,5]" "RES[1,(FN:@ravi four,LN:!belkud five)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Search special chars - Alpha Sort
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[1,EItut,EAlphaSort,5]" "RES[4,(FN:yz,LN:123,CN:Nokia)(FN:@ravi four,LN:!belkud five)(FN:+allen,LN:good,CN:Nokia)(FN:4four,LN:&ampli,CN:Nokia)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[! @,EItut,EAlphaSort,5]" "RES[1,(FN:@ravi four,LN:!belkud five)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Search contact starting with 0
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[0642,EItut,EAlphaSort,5]" "RES[1,(FN:0Nick,LN:0Jack,CN:0Sam)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[0?8%,EItut,EAlphaSort,5]" "RES[1,(FN:0Nick,LN:0Jack,CN:0Sam)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Search in multiple data stores
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb,cntdb:\/\/c:contacts.gdb]" "SQ[8434,EItut,EAlphaSort,5]" "RES[2,(FN:TheGroup)(FN:mno,LN:pqr TheGr,CN:Nokia)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb,cntdb:\/\/c:contacts.gdb]" "SQ[5#3=,EItut,EAlphaSort,5]" "RES[2,(FN:TheGroup)(FN:mno,LN:pqr TheGr,CN:Nokia)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Search (Itut) - Alpha Sort -> Truncate result
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[5,EItut,EAlphaSort,3]" "RES[3,(FN:a b c d e f g Jay,LN:L Gee,CN:Nokia India)(FN:ghi,LN:jkl,CN:Nokia)(FN:John,LN:Tom,CN:Nokia)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[*,EItut,EAlphaSort,3]" "RES[3,(FN:a b c d e f g Jay,LN:L Gee,CN:Nokia India)(FN:ghi,LN:jkl,CN:Nokia)(FN:John,LN:Tom,CN:Nokia)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title CS: Search (Itut) - Pattern Sort -> Truncate result
create PsClientTestSuite api
api WriteTitleToLog
api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[5,EItut,EPatternSort,3]" "RES[3,(FN:a b c d e f g Jay,LN:L Gee,CN:Nokia India)(FN:ghi,LN:jkl,CN:Nokia)(FN:John,LN:Tom,CN:Nokia)]"
//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[*,EItut,EPatternSort,3]" "RES[3,(FN:a b c d e f g Jay,LN:L Gee,CN:Nokia India)(FN:ghi,LN:jkl,CN:Nokia)(FN:John,LN:Tom,CN:Nokia)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title Cancel search 
create PsClientTestSuite api
api WriteTitleToLog
api CancelSearch "URI[cntdb:\/\/c:contacts.cdb]" "SQ[624374,EItut,EAlphaSort,5]" "RES[1,(FN:mahesh,LN:doraiswamy,CN:Nokia)]"
delete api
[Endtest]


//------------------------------------------------------------------------------
//					TestSearchingWithInGroup ("GS")
//------------------------------------------------------------------------------


//******************************************************************************
[Test]
title GS: Search FirstName in group (Qwerty)
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingWithInGroup "SrchInGroup[TheGroup]" "SQ[abc,EQwerty,EAlphaSort,5]" "RES[1,(FN:abc,LN:def,CN:Nokia)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title GS: Search in group - Empty Query
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingWithInGroup "SrchInGroup[TheGroup]" "SQ[,EQwerty,EAlphaSort,5]" "RES[3,(FN:abc,LN:def,CN:Nokia)(FN:ghi,LN:jkl,CN:Nokia)(FN:mno,LN:pqr TheGr,CN:Nokia)]"
delete api
[Endtest]


//******************************************************************************
[Test]
title GS: Search in group (Qwerty) - Empty Query -> No result
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingWithInGroup "SrchInGroup[TheGroup]" "SQ[afdsbc,EQwerty,EPatternSort,5]" "RES[0,]"
delete api
[Endtest]


//******************************************************************************
[Test]
title GS: Search in non-existing group
create PsClientTestSuite api
api WriteTitleToLog
api TestSearchingWithInGroup "SrchInGroup[TheNonExistantGroup]" "SQ[abc,EQwerty,EAlphaSort,5]" "RES[0,]"
delete api
[Endtest]


//------------------------------------------------------------------------------
//					Miscellaneous ("Mi")
//------------------------------------------------------------------------------


//******************************************************************************
[Test]
title Mi: Check Caching status
create PsClientTestSuite api
api WriteTitleToLog
api CheckCachingStatus
delete api
[Endtest]


//******************************************************************************
[Test]
title Mi: Check Version
create PsClientTestSuite api
api WriteTitleToLog
api CheckVersion
delete api
[Endtest]


//******************************************************************************
[Test]
title Mi: Remove Observer
create PsClientTestSuite api
api WriteTitleToLog
api RemoveObserver "URI[cntdb:\/\/c:contacts.cdb]"
delete api
[Endtest]


//******************************************************************************
[Test]
title Mi: Marked contacts
create PsClientTestSuite api
api WriteTitleToLog
api AddMarkedContactsTest "URI[cntdb:\/\/c:contacts.cdb]" "SQ[624374,EItut,EAlphaSort,25]" "RES[19,(FN:Pcs,LN:,CN:)(FN:0Nick,LN:0Jack,CN:0Sam)(FN:yz,LN:123,CN:Nokia)(FN:@ravi four,LN:!belkud five)(FN:4four,LN:&ampli,CN:Nokia)(FN:abc,LN:def,CN:Nokia)(FN:chiru,LN:devi,CN:motorola)(FN:mahesh,LN:doraiswamy,CN:Nokia)(FN:+allen,LN:good,CN:Nokia)(FN:ghi,LN:jkl,CN:Nokia)(FN:Tim,LN:Jones,CN:Nokia)(FN:a b c d e f g Jay,LN:L Gee,CN:Nokia India)(FN:Lpcsillet,LN:Lpcsucy,CN:Lpcsush)(FN:a0r,LN:pqr,CN:Nokia)(FN:mno,LN:pqr TheGr,CN:Nokia)(FN:M0hn,LN:Time,CN:Nokia)(FN:John,LN:Tom,CN:Nokia)(FN:ravi kiran,LN:velkud,CN:Nokia)(FN:Ästrid,LN:Öhlm,CN:Åppres)]"
delete api
[Endtest]


//------------------------------------------------------------------------------
//					TestSortOrder ("SO")
//------------------------------------------------------------------------------


//******************************************************************************
[Test]
title SO: Change Sort Order test 1
create PsClientTestSuite api
api WriteTitleToLog
api TestSortOrder "URI[cntdb:\/\/c:contacts.cdb]" "SORTORDER[6,2,37]"
delete api
[Endtest]


//******************************************************************************
[Test]
title SO: Change Sort Order test 2
create PsClientTestSuite api
api WriteTitleToLog
api TestSortOrder "URI[cntdb:\/\/c:contacts.cdb]" "SORTORDER[6,2,37,22]"
delete api
[Endtest]


//******************************************************************************
[Test]
title SO: Change Sort Order - More than 10 keys
create PsClientTestSuite api
api WriteTitleToLog
api TestSortOrder "URI[cntdb:\/\/c:contacts.cdb]" "SORTORDER[1,2,3,4,5,6,7,8,9,10,11]"
delete api
[Endtest]


//******************************************************************************
[Test]
title SO: Change Sort Order - Same sort order
create PsClientTestSuite api
api WriteTitleToLog
api TestSortOrder "URI[cntdb:\/\/c:contacts.cdb]" "SORTORDER[]"
delete api
[Endtest]


//******************************************************************************
[Test]
title SO: Change Sort Order on a group URI
create PsClientTestSuite api
api WriteTitleToLog
api TestSortOrderErrCaseL "URI[cntdb:\/\/c:contacts.gdb?id=3221]" "SORTORDER[6,2,37]"
delete api
[Endtest]


//******************************************************************************
[Test]
title SO: Change Sort Order on a wrong group URI
create PsClientTestSuite api
api WriteTitleToLog
api TestSortOrderErrCaseL "URI[cntdb:\/\/c:wrongcontactsuri.cdb]" "SORTORDER[6,2,37]"
delete api
[Endtest]


//------------------------------------------------------------------------------
//					ShutDown Server ("SD")
//------------------------------------------------------------------------------


//******************************************************************************
[Test]
title SD: Shut Down the Server
create PsClientTestSuite api
api WriteTitleToLog
api ShutDown
delete api
[Endtest]


//------------------------------------------------------------------------------
//					END OF FILE
//------------------------------------------------------------------------------
