devmngt_plat/services_db_api/tsrc/ServicesDbApiTest/conf/ui_ServicesDbApiTest.cfg
changeset 0 254040eb3b7d
equal deleted inserted replaced
-1:000000000000 0:254040eb3b7d
       
     1 ###################################################################################
       
     2 #
       
     3 # This cfg file has tests for Services DB API
       
     4 # The resource file - ServicesDbApiTest.rss defined to test this api has the following services. 
       
     5 # The tests listed below are based on this resource file services
       
     6 #
       
     7 # RESOURCE DAS_SERVICES r_da_service_mime
       
     8 #    {
       
     9 #   services = 
       
    10 #        {
       
    11 #       DAS_SERVICE_ENTRY
       
    12 #            {
       
    13 #            service_uid = 0x101; // NOT A REAL UID - 257 
       
    14 #            service_name = "Open";
       
    15 #            service_localized_name = "Open Localized";
       
    16 #            },
       
    17 #        DAS_SERVICE_ENTRY
       
    18 #            {
       
    19 #            service_uid = 0x102; // NOT A REAL UID - 258
       
    20 #            service_name = "Upload";
       
    21 #            service_localized_name = "Upload Localized";
       
    22 #            },
       
    23 #        DAS_SERVICE_ENTRY
       
    24 #            {
       
    25 #            service_uid = 0x103; // NOT A REAL UID - 259
       
    26 #            service_name = "Print";
       
    27 #            service_localized_name = "Print Localized %U";
       
    28 #            }
       
    29 #        };
       
    30 #
       
    31 ###################################################################################
       
    32 
       
    33 
       
    34 [Define]
       
    35 KFirstServiceIndex             0
       
    36 KSecondServiceIndex            1
       
    37 KThirdServiceIndex             2
       
    38 KNotAServiceInResourceIndex    10
       
    39 KFirstServiceUid               257
       
    40 KSecondServiceUid              258
       
    41 KThirdServiceUid               259
       
    42 KNotAServiceInResourceUid      260
       
    43 KErrGeneral                    -2
       
    44 KErrArgument                   -6
       
    45 [Enddefine]
       
    46 
       
    47 
       
    48 # This test case is for NewL
       
    49 # 1
       
    50 [Test]
       
    51 title Initialize Services DB 
       
    52 create ServicesDbApiTest foobar
       
    53 foobar InitializeSeviceDB 
       
    54 delete foobar
       
    55 [Endtest]
       
    56 
       
    57 # This test case is for NewLC
       
    58 # 2
       
    59 [Test]
       
    60 title Initialize on stack
       
    61 create ServicesDbApiTest foobar
       
    62 foobar InitializeonStackSeviceDB 
       
    63 delete foobar
       
    64 [Endtest]
       
    65 
       
    66 # Testing Count function 
       
    67 # 3 
       
    68 [Test]
       
    69 title CountSeviceDB
       
    70 create ServicesDbApiTest foobar
       
    71 foobar CountSeviceDB 
       
    72 delete foobar
       
    73 [Endtest]  
       
    74 
       
    75 ######################################################################
       
    76 # Testing ServiceUidL function with different INDEX parameters 
       
    77 ######################################################################
       
    78 # 4
       
    79 [Test]
       
    80 title Test ServiceUidL - No parameter
       
    81 create ServicesDbApiTest foobar
       
    82 allownextresult KErrGeneral
       
    83 foobar ServiceUidLSeviceDB 
       
    84 delete foobar
       
    85 [Endtest]  
       
    86 
       
    87 #5
       
    88 [Test]
       
    89 title Test ServiceUidL 0 INDEX
       
    90 create ServicesDbApiTest foobar
       
    91 foobar ServiceUidLSeviceDB KFirstServiceIndex
       
    92 delete foobar
       
    93 [Endtest] 
       
    94 
       
    95 #6 
       
    96 [Test]
       
    97 title Test ServiceUidL 1 INDEX
       
    98 create ServicesDbApiTest foobar
       
    99 foobar ServiceUidLSeviceDB KSecondServiceIndex
       
   100 delete foobar
       
   101 [Endtest] 
       
   102 
       
   103 #7
       
   104 [Test]
       
   105 title Test ServiceUidL 2 INDEX
       
   106 create ServicesDbApiTest foobar
       
   107 foobar ServiceUidLSeviceDB KThirdServiceIndex
       
   108 delete foobar
       
   109 [Endtest] 
       
   110 
       
   111 #8
       
   112 [Test]
       
   113 title Test ServiceUidL Wrong INDEX
       
   114 create ServicesDbApiTest foobar
       
   115 allownextresult KErrArgument
       
   116 foobar ServiceUidLSeviceDB KNotAServiceInResourceIndex
       
   117 delete foobar
       
   118 [Endtest] 
       
   119 
       
   120 #--------------------------------------------------------------------#
       
   121 
       
   122 ######################################################################
       
   123 # Testing ServiceStringLC function with different INDEX parameters 
       
   124 ######################################################################
       
   125 #9
       
   126 [Test]
       
   127 title Test ServiceStringLC with No Index
       
   128 create ServicesDbApiTest foobar
       
   129 allownextresult KErrGeneral
       
   130 foobar ServiceStringLCSeviceDB 
       
   131 delete foobar
       
   132 [Endtest]  
       
   133 
       
   134 #10
       
   135 [Test]
       
   136 title Test ServiceStringLC with  0 Index
       
   137 create ServicesDbApiTest foobar
       
   138 foobar ServiceStringLCSeviceDB KFirstServiceIndex
       
   139 delete foobar
       
   140 [Endtest]  
       
   141 
       
   142 #11
       
   143 [Test]
       
   144 title Test ServiceStringLC with  1 Index
       
   145 create ServicesDbApiTest foobar
       
   146 foobar ServiceStringLCSeviceDB KSecondServiceIndex
       
   147 delete foobar
       
   148 [Endtest]  
       
   149 
       
   150 #12
       
   151 [Test]
       
   152 title Test ServiceStringLC with  2 Index
       
   153 create ServicesDbApiTest foobar
       
   154 foobar ServiceStringLCSeviceDB KThirdServiceIndex
       
   155 delete foobar
       
   156 [Endtest]  
       
   157 
       
   158 #13
       
   159 [Test]
       
   160 title Test ServiceStringLC with  wrong Index
       
   161 create ServicesDbApiTest foobar
       
   162 allownextresult KErrArgument
       
   163 foobar ServiceStringLCSeviceDB KNotAServiceInResourceIndex
       
   164 delete foobar
       
   165 [Endtest]  
       
   166 
       
   167 #--------------------------------------------------------------------#
       
   168 
       
   169 ######################################################################
       
   170 # Testing ServiceStringLC function with different UID as parameters 
       
   171 ######################################################################
       
   172 #14
       
   173 [Test]
       
   174 title Test ServiceStringLC with No UID
       
   175 create ServicesDbApiTest foobar
       
   176 allownextresult KErrGeneral
       
   177 foobar ServiceStringLCUIDSeviceDB 
       
   178 delete foobar
       
   179 [Endtest]
       
   180 
       
   181 #15
       
   182 [Test]
       
   183 title Test ServiceStringLC with 257 UID (0x101)
       
   184 create ServicesDbApiTest foobar
       
   185 foobar ServiceStringLCUIDSeviceDB KFirstServiceUid
       
   186 delete foobar
       
   187 [Endtest]
       
   188 
       
   189 #16
       
   190 [Test]
       
   191 title Test ServiceStringLC with 258 UID (0x102)
       
   192 create ServicesDbApiTest foobar
       
   193 foobar ServiceStringLCUIDSeviceDB KSecondServiceUid
       
   194 delete foobar
       
   195 [Endtest]
       
   196 
       
   197 #17
       
   198 [Test]
       
   199 title Test ServiceStringLC with 258 UID (0x103)
       
   200 create ServicesDbApiTest foobar
       
   201 foobar ServiceStringLCUIDSeviceDB KThirdServiceUid
       
   202 delete foobar
       
   203 [Endtest]
       
   204 
       
   205 #18
       
   206 [Test]
       
   207 title Test ServiceStringLC with Wrong UID 
       
   208 create ServicesDbApiTest foobar
       
   209 foobar ServiceStringLCUIDSeviceDB KNotAServiceInResourceUid
       
   210 delete foobar
       
   211 [Endtest]
       
   212 
       
   213 #--------------------------------------------------------------------#
       
   214 
       
   215 ######################################################################
       
   216 # Testing ServiceNameLC function with different INDEX as parameters 
       
   217 ######################################################################
       
   218 #19
       
   219 [Test]
       
   220 title test ServiceNameLC with No parameter 
       
   221 allownextresult KErrGeneral
       
   222 create ServicesDbApiTest foobar
       
   223 foobar ServiceNameLCSeviceDB 
       
   224 delete foobar
       
   225 [Endtest]
       
   226 
       
   227 #20
       
   228 [Test]
       
   229 title test ServiceNameLC with 0 index
       
   230 create ServicesDbApiTest foobar
       
   231 foobar ServiceNameLCSeviceDB KFirstServiceIndex
       
   232 delete foobar
       
   233 [Endtest]
       
   234 
       
   235 #21
       
   236 [Test]
       
   237 title test ServiceNameLC with 1 index
       
   238 create ServicesDbApiTest foobar
       
   239 foobar ServiceNameLCSeviceDB KSecondServiceIndex
       
   240 delete foobar
       
   241 [Endtest]
       
   242 
       
   243 #22
       
   244 [Test]
       
   245 title test ServiceNameLC with 2 index
       
   246 create ServicesDbApiTest foobar
       
   247 foobar ServiceNameLCSeviceDB KThirdServiceIndex
       
   248 delete foobar
       
   249 [Endtest]
       
   250 
       
   251 #23
       
   252 [Test]
       
   253 title test ServiceNameLC with incorrect index
       
   254 create ServicesDbApiTest foobar
       
   255 allownextresult KErrArgument
       
   256 foobar ServiceNameLCSeviceDB KNotAServiceInResourceIndex
       
   257 delete foobar
       
   258 [Endtest]
       
   259 
       
   260 #--------------------------------------------------------------------#
       
   261 
       
   262 ######################################################################
       
   263 # Testing ServiceNameLC function with different UID as parameters 
       
   264 ######################################################################
       
   265 #24
       
   266 [Test]
       
   267 title test ServiceNameLC with No Parameter
       
   268 allownextresult KErrGeneral
       
   269 create ServicesDbApiTest foobar
       
   270 foobar ServiceNameLCuidSeviceDB 
       
   271 delete foobar
       
   272 [Endtest]
       
   273 
       
   274 #25
       
   275 [Test]
       
   276 title test ServiceNameLC with  257 UID (0x101)
       
   277 create ServicesDbApiTest foobar
       
   278 foobar ServiceNameLCuidSeviceDB KFirstServiceUid
       
   279 delete foobar
       
   280 [Endtest]
       
   281 
       
   282 #26
       
   283 [Test]
       
   284 title test ServiceNameLC with  258 UID (0x102)
       
   285 create ServicesDbApiTest foobar
       
   286 foobar ServiceNameLCuidSeviceDB KSecondServiceUid
       
   287 delete foobar
       
   288 [Endtest]
       
   289 
       
   290 #27
       
   291 [Test]
       
   292 title test ServiceNameLC with  259 UID (0x103)
       
   293 create ServicesDbApiTest foobar
       
   294 foobar ServiceNameLCuidSeviceDB KThirdServiceUid
       
   295 delete foobar
       
   296 [Endtest]
       
   297 
       
   298 #28
       
   299 [Test]
       
   300 title test ServiceNameLC with  260 UID
       
   301 create ServicesDbApiTest foobar
       
   302 foobar ServiceNameLCuidSeviceDB KNotAServiceInResourceUid
       
   303 delete foobar
       
   304 [Endtest]