bluetoothapitest/bluetoothsvs/T_BTSdpAPI/scripts/BTSDP-Agent-PublicApi-Unconnected.script
changeset 0 29b1cd4cb562
equal deleted inserted replaced
-1:000000000000 0:29b1cd4cb562
       
     1 //
       
     2 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 // All rights reserved.
       
     4 // This component and the accompanying materials are made available
       
     5 // under the terms of "Eclipse Public License v1.0"
       
     6 // which accompanies this distribution, and is available
       
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 //
       
     9 // Initial Contributors:
       
    10 // Nokia Corporation - initial contribution.
       
    11 //
       
    12 // Contributors:
       
    13 //
       
    14 // Description:
       
    15 //
       
    16 ///////////////////////////////////////////////////////////////////////////////
       
    17 //! @file
       
    18 //! @SYMTestSuiteName			T_BTSdpAPI
       
    19 //! @SYMScriptTestEnvironment	This test script requires a basic ROM with bluetooth dongle.
       
    20 //! @SYMScriptDescription		Tests all public elements of the CSdpAttrIdMatchList class
       
    21 //!								as a means of confidence that the API works as expected. 
       
    22 //!								The purpose is to provide a regression test suite of PublishedAll APIs for 
       
    23 //!								BT SDP related classes.
       
    24 //!								Negative testing is performed to confirm that correct errors are returned 
       
    25 //!								when incorrect parameters are given. The tests are fully automated.
       
    26 //! @SYMAuthor					Symbio
       
    27 //! @SYMCreationDate			27/09/2006
       
    28 ///////////////////////////////////////////////////////////////////////////////
       
    29 
       
    30 
       
    31 RUN_UTILS	MkDir	${SYSDRIVE}\bluetooth\
       
    32 RUN_UTILS	MkDir	${SYSDRIVE}\bluetooth\sdp\
       
    33 RUN_UTILS	MkDir	${SYSDRIVE}\bluetooth\sdp\T_SdpAgent\
       
    34 
       
    35 LOAD_SUITE	T_BTSdpAPI	-SharedData
       
    36 DELAY		500
       
    37 
       
    38 
       
    39 // ****************************************************************************
       
    40 // CSdpAttrValueNil unconnected tests
       
    41 // **************************************************************************** 
       
    42 
       
    43 START_TESTCASE BTSDP-AttrValNil-PublicApi-0101
       
    44 //! @SYMTestCaseID				BTSDP-AttrValNil-PublicApi-0101
       
    45 //! @SYMAPI						CSdpAttrValueNil
       
    46 //! @SYMTestCaseDesc			Creation of a CSdpAttrValueNil attribute
       
    47 //!								Uses API elements: NewNilL() and ~CSdpAttrValueNil()
       
    48 //! @SYMTestActions				1. Construct a CSdpAttrValueNil object with a null value
       
    49 //!								2. Delete CSdpAttrValueNil object
       
    50 //! @SYMTestStatus				Implemented
       
    51 //! @SYMTestPriority			Critical
       
    52 //! @SYMTestExpectedResults		CSdpAttrValueNil object was created successfully
       
    53 //! @SYMTestType				CIT
       
    54 
       
    55 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
    56 			CREATE_OBJECT	CSdpAttrValueNil	attrvaluenil1	
       
    57 			COMMAND		attrvaluenil1	NewNilL
       
    58 			COMMAND		attrvaluenil1	~
       
    59 	END_TEST_BLOCK
       
    60 
       
    61 END_TESTCASE   BTSDP-AttrValNil-PublicApi-0101
       
    62 
       
    63 
       
    64 START_TESTCASE BTSDP-AttrValNil-PublicApi-0102
       
    65 //! @SYMTestCaseID				BTSDP-AttrValNil-PublicApi-0102
       
    66 //! @SYMAPI						CSdpAttrValueNil
       
    67 //! @SYMTestCaseDesc			Get CSdpAttrValueNil data size
       
    68 //!								Uses API elements: NewNilL(), DataSize() and ~CSdpAttrValueNil()
       
    69 //! @SYMTestActions				1. Construct a CSdpAttrValueNil object with a null value
       
    70 //!								2. Get the size of CSdpAttrValueNil object. Verify the correctness of the size.
       
    71 //!								3. Delete CSdpAttrValueNil object
       
    72 //! @SYMTestStatus				Implemented
       
    73 //! @SYMTestPriority			Low
       
    74 //! @SYMTestExpectedResults		Returned CSdpAttrValueNil object size (always be 0) successfully
       
    75 //! @SYMTestType				CIT
       
    76 
       
    77 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
    78 			CREATE_OBJECT	CSdpAttrValueNil	attrvaluenil1	
       
    79 			COMMAND		attrvaluenil1	NewNilL
       
    80 			COMMAND		attrvaluenil1	DataSize		BTSDP-AttrValNil-PublicApi-0102-0001command2DataSize
       
    81 			COMMAND		attrvaluenil1	~
       
    82 	END_TEST_BLOCK
       
    83 
       
    84 END_TESTCASE BTSDP-AttrValNil-PublicApi-0102
       
    85 
       
    86 
       
    87 START_TESTCASE BTSDP-AttrValNil-PublicApi-0103
       
    88 //! @SYMTestCaseID				BTSDP-AttrValNil-PublicApi-0103
       
    89 //! @SYMAPI						CSdpAttrValueNil
       
    90 //! @SYMTestCaseDesc			Get CSdpAttrValueNil data element type
       
    91 //!								Uses API elements: NewNilL(), Type() and ~CSdpAttrValueNil()
       
    92 //! @SYMTestActions				1. Construct a CSdpAttrValueNil object with a null value
       
    93 //!								2. Get the element type of CSdpAttrValueNil object. Verify the correctness of the type.
       
    94 //!								3. Delete CSdpAttrValueNil object
       
    95 //! @SYMTestStatus				Implemented
       
    96 //! @SYMTestPriority			Critical
       
    97 //! @SYMTestExpectedResults		Returned the element type of CSdpAttrValueNil successfully
       
    98 //! @SYMTestType				CIT
       
    99 
       
   100 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   101 			CREATE_OBJECT	CSdpAttrValueNil	attrvaluenil1	
       
   102 			COMMAND		attrvaluenil1	NewNilL
       
   103 			COMMAND		attrvaluenil1	Type		BTSDP-AttrValNil-PublicApi-0103-0001command2Type
       
   104 			COMMAND		attrvaluenil1	~
       
   105 	END_TEST_BLOCK
       
   106 
       
   107 END_TESTCASE   BTSDP-AttrValNil-PublicApi-0103
       
   108 
       
   109 
       
   110 // ****************************************************************************
       
   111 // Testing virtual functions inherited from CSdpAttrValue
       
   112 // **************************************************************************** 
       
   113 
       
   114 START_TESTCASE BTSDP-AttrValNil-PublicApi-0104
       
   115 //! @SYMTestCaseID				BTSDP-AttrValNil-PublicApi-0104
       
   116 //! @SYMAPI						CSdpAttrValueNil, CSdpAttrValue and MSdpAttributeValueVisitor
       
   117 //! @SYMTestCaseDesc			Request a call back to pass CSdpAttrValueNil attribute value.
       
   118 //!								Uses API elements: NewNilL(), AcceptVisitorL(), VisitAttributeValueL() 
       
   119 //!								and ~CSdpAttrValueNil()
       
   120 //! @SYMTestActions				1. Construct a CSdpAttrValueNil object with a null value
       
   121 //!								2. Request a call back to pass CSdpAttrValueNil object
       
   122 //!								3. Call AcceptVisitorL() function inherited from CSdpAttrValue.
       
   123 //!								   CT_DataSdpAttrValueNil contains the implementation of MSdpAttributeValueVisitor.
       
   124 //!								   So, pass CT_DataSdpAttrValueNil object itself as the visitor into the function.
       
   125 //!								   Verify the printed results of the visitor in test log.
       
   126 //!								4. Delete CSdpAttrValueNil object
       
   127 //! @SYMTestStatus				Implemented
       
   128 //! @SYMTestPriority			High
       
   129 //! @SYMTestExpectedResults		Attribute type and value correctly printed by the Valuevisitor 
       
   130 //! @SYMTestType				CIT
       
   131 
       
   132 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   133 			CREATE_OBJECT	CSdpAttrValueNil	attrvaluenil1	
       
   134 			COMMAND		attrvaluenil1	NewNilL
       
   135 			COMMAND		attrvaluenil1	AcceptVisitorL		BTSDP-AttrValNil-PublicApi-0104-0001command2AcceptVisitorL
       
   136 			COMMAND		attrvaluenil1	~
       
   137 	END_TEST_BLOCK
       
   138 
       
   139 END_TESTCASE   BTSDP-AttrValNil-PublicApi-0104
       
   140 
       
   141 
       
   142 START_TESTCASE BTSDP-AttrValNil-PublicApi-0105
       
   143 //! @SYMTestCaseID				BTSDP-AttrValNil-PublicApi-0105
       
   144 //! @SYMAPI						CSdpAttrValueNil and CSdpAttrValue
       
   145 //! @SYMTestCaseDesc			Test CSdpAttrValue's Bool() function
       
   146 //!								Uses API elements: NewNilL() and Bool()
       
   147 //! @SYMTestActions				1. Construct a CSdpAttrValueNil object with a null value
       
   148 //!								2. Call the virtual function Bool() inherited from CSdpAttrValue which causes a panic
       
   149 //! @SYMTestStatus				Implemented
       
   150 //! @SYMTestPriority			Low
       
   151 //! @SYMTestExpectedResults		Caught a panic
       
   152 //! @SYMTestType				CIT
       
   153 
       
   154 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   155 			CREATE_OBJECT	CSdpAttrValueNil	attrvaluenil1	
       
   156 			COMMAND		attrvaluenil1	NewNilL
       
   157 			COMMAND		attrvaluenil1	Bool
       
   158 	END_TEST_BLOCK	!PanicCode=0	!PanicString=SDP-Database
       
   159 
       
   160 END_TESTCASE   BTSDP-AttrValNil-PublicApi-0105
       
   161 
       
   162 
       
   163 START_TESTCASE BTSDP-AttrValNil-PublicApi-0106
       
   164 //! @SYMTestCaseID				BTSDP-AttrValNil-PublicApi-0106
       
   165 //! @SYMAPI						CSdpAttrValueNil and CSdpAttrValue
       
   166 //! @SYMTestCaseDesc			Get the value of the referenced data object from the prewirte buffer
       
   167 //!								Uses API elements: NewNilL() and Des()
       
   168 //! @SYMTestActions				1. Construct a CSdpAttrValueNil object with a null value
       
   169 //!								2. Call the virtual function Des() inherited from CSdpAttrValue which causes a panic
       
   170 //! @SYMTestStatus				Implemented
       
   171 //! @SYMTestPriority			Low
       
   172 //! @SYMTestExpectedResults		Caught a panic
       
   173 //! @SYMTestType				CIT
       
   174 
       
   175 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   176 			CREATE_OBJECT	CSdpAttrValueNil	attrvaluenil1	
       
   177 			COMMAND		attrvaluenil1	NewNilL
       
   178 			COMMAND		attrvaluenil1	Des
       
   179 	END_TEST_BLOCK	!PanicCode=0	!PanicString=SDP-Database
       
   180 
       
   181 END_TESTCASE   BTSDP-AttrValNil-PublicApi-0106
       
   182 
       
   183 
       
   184 START_TESTCASE BTSDP-AttrValNil-PublicApi-0107
       
   185 //! @SYMTestCaseID				BTSDP-AttrValNil-PublicApi-0107
       
   186 //! @SYMAPI						CSdpAttrValueNil and CSdpAttrValue
       
   187 //! @SYMTestCaseDesc			Test if CSdpAttrValueNil attribute can hold an integer value
       
   188 //!								Uses API elements: NewNilL(), DoesIntFit() and ~CSdpAttrValueNil()
       
   189 //! @SYMTestActions				1. Construct a CSdpAttrValueNil object with a null value
       
   190 //!								2. Call DoesIntFit() and verify that CSdpAttrValueNil object cannot be held by integer 
       
   191 //!								3. Delete CSdpAttrValueNil object
       
   192 //! @SYMTestStatus				Implemented
       
   193 //! @SYMTestPriority			Low
       
   194 //! @SYMTestExpectedResults		CSdpAttrValueNil attribute cannot be held by integer
       
   195 //! @SYMTestType				CIT
       
   196 
       
   197 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   198 			CREATE_OBJECT	CSdpAttrValueNil	attrvaluenil1	
       
   199 			COMMAND		attrvaluenil1	NewNilL
       
   200 			COMMAND		attrvaluenil1	DoesIntFit		BTSDP-AttrValNil-PublicApi-0107-0001command2DoesIntFit
       
   201 			COMMAND		attrvaluenil1	~
       
   202 	END_TEST_BLOCK
       
   203 
       
   204 END_TESTCASE   BTSDP-AttrValNil-PublicApi-0107
       
   205 
       
   206 
       
   207 START_TESTCASE BTSDP-AttrValNil-PublicApi-0108
       
   208 //! @SYMTestCaseID				BTSDP-AttrValNil-PublicApi-0108
       
   209 //! @SYMAPI						CSdpAttrValueNil and CSdpAttrValue
       
   210 //! @SYMTestCaseDesc			Test CSdpAttrValue's Int() function
       
   211 //!								Uses API elements: NewNilL() and Int()
       
   212 //! @SYMTestActions				1. Construct a CSdpAttrValueNil object with a null value
       
   213 //!								2. Call the virtual function Int() inherited from CSdpAttrValue which causes a panic
       
   214 //! @SYMTestStatus				Implemented
       
   215 //! @SYMTestPriority			Low
       
   216 //! @SYMTestExpectedResults		Caught a panic
       
   217 //! @SYMTestType				CIT
       
   218 
       
   219 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   220 			CREATE_OBJECT	CSdpAttrValueNil	attrvaluenil1	
       
   221 			COMMAND		attrvaluenil1	NewNilL
       
   222 			COMMAND		attrvaluenil1	Int
       
   223 	END_TEST_BLOCK	!PanicCode=0	!PanicString=SDP-Database
       
   224 
       
   225 END_TESTCASE   BTSDP-AttrValNil-PublicApi-0108
       
   226 
       
   227 
       
   228 START_TESTCASE BTSDP-AttrValNil-PublicApi-0109
       
   229 //! @SYMTestCaseID				BTSDP-AttrValNil-PublicApi-0109
       
   230 //! @SYMAPI						CSdpAttrValueNil and CSdpAttrValue
       
   231 //! @SYMTestCaseDesc			Test CSdpAttrValue's UUID() function
       
   232 //!								Uses API elements: NewNilL() and UUID()
       
   233 //! @SYMTestActions				1. Construct a CSdpAttrValueNil object with a null value
       
   234 //!								2. Call the virtual function UUID() inherited from CSdpAttrValue which causes a panic
       
   235 //! @SYMTestStatus				Implemented
       
   236 //! @SYMTestPriority			Low
       
   237 //! @SYMTestExpectedResults		Caught a panic
       
   238 //! @SYMTestType				CIT
       
   239 
       
   240 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   241 			CREATE_OBJECT	CSdpAttrValueNil	attrvaluenil1	
       
   242 			COMMAND		attrvaluenil1	NewNilL
       
   243 			COMMAND		attrvaluenil1	UUID
       
   244 	END_TEST_BLOCK	!PanicCode=0	!PanicString=SDP-Database
       
   245 
       
   246 END_TESTCASE   BTSDP-AttrValNil-PublicApi-0109
       
   247 
       
   248 
       
   249 START_TESTCASE BTSDP-AttrValNil-PublicApi-0110
       
   250 //! @SYMTestCaseID				BTSDP-AttrValNil-PublicApi-0110
       
   251 //! @SYMAPI						CSdpAttrValueNil and CSdpAttrValue
       
   252 //! @SYMTestCaseDesc			Test CSdpAttrValue's Uint() function
       
   253 //!								Uses API elements: NewNilL() and Uint()
       
   254 //! @SYMTestActions				1. Construct a CSdpAttrValueNil object with a null value
       
   255 //!								2. Call the virtual function Uint() inherited from CSdpAttrValue which causes a panic
       
   256 //! @SYMTestStatus				Implemented
       
   257 //! @SYMTestPriority			Low
       
   258 //! @SYMTestExpectedResults		Caught a panic
       
   259 //! @SYMTestType				CIT
       
   260 
       
   261 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   262 			CREATE_OBJECT	CSdpAttrValueNil	attrvaluenil1	
       
   263 			COMMAND		attrvaluenil1	NewNilL
       
   264 			COMMAND		attrvaluenil1	Uint
       
   265 	END_TEST_BLOCK	!PanicCode=0	!PanicString=SDP-Database
       
   266 
       
   267 END_TESTCASE   BTSDP-AttrValNil-PublicApi-0110
       
   268 
       
   269 
       
   270 START_TESTCASE BTSDP-AttrValNil-PublicApi-0114
       
   271 //! @SYMTestCaseID				BTSDP-AttrValNil-PublicApi-0114
       
   272 //! @SYMAPI						CSdpAttrValueNil and CSdpAttrValue
       
   273 //! @SYMTestCaseDesc			Test for CSdpAttrValueNil's deconstructor
       
   274 //!								Uses API elements: ~CSdpAttrValueNil()
       
   275 //! @SYMTestActions				1. Call ~CSdpAttrValueNil() without constructing the object first
       
   276 //! @SYMTestStatus				Implemented
       
   277 //! @SYMTestPriority			Low
       
   278 //! @SYMTestExpectedResults		no error or panic
       
   279 //! @SYMTestType				CIT
       
   280 
       
   281 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   282 			CREATE_OBJECT	CSdpAttrValueNil	attrvaluenil1	
       
   283 			COMMAND		attrvaluenil1	~
       
   284 	END_TEST_BLOCK
       
   285 
       
   286 END_TESTCASE   BTSDP-AttrValNil-PublicApi-0114
       
   287 
       
   288 
       
   289 
       
   290 // ****************************************************************************
       
   291 // CSdpAttrValueBoolean unconnected tests
       
   292 // **************************************************************************** 
       
   293 
       
   294 START_TESTCASE BTSDP-AttrValBool-PublicApi-0001
       
   295 //! @SYMTestCaseID				BTSDP-AttrValBool-PublicApi-0001
       
   296 //! @SYMAPI						CSdpAttrValueBoolean
       
   297 //! @SYMTestCaseDesc			Creation of a CSdpAttrValueBoolean attribute
       
   298 //!								Uses API elements: NewBoolL() and ~CSdpAttrValueBoolean()
       
   299 //! @SYMTestActions				1. Construct a CSdpAttrValueBoolean object with a TRUE value
       
   300 //!								2. Delete CSdpAttrValueBoolean object
       
   301 //! @SYMTestStatus				Implemented
       
   302 //! @SYMTestPriority			Critical
       
   303 //! @SYMTestExpectedResults		CSdpAttrValueBoolean object was created successfully
       
   304 //! @SYMTestType				CIT
       
   305 
       
   306 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   307 			CREATE_OBJECT	CSdpAttrValueBoolean	attrvalueboolean	
       
   308 			COMMAND		attrvalueboolean	NewBoolL		BTSDP-AttrValBool-PublicApi-0001-0001command1NewBoolL
       
   309 			COMMAND		attrvalueboolean	~
       
   310 	END_TEST_BLOCK
       
   311 
       
   312 END_TESTCASE   BTSDP-AttrValBool-PublicApi-0001
       
   313 
       
   314 
       
   315 START_TESTCASE BTSDP-AttrValBool-PublicApi-0002
       
   316 //! @SYMTestCaseID				BTSDP-AttrValBool-PublicApi-0002
       
   317 //! @SYMAPI						CSdpAttrValueBoolean
       
   318 //! @SYMTestCaseDesc			Fetch CSdpAttrValueBoolean data size
       
   319 //!								Uses API elements: NewBoolL(), DataSize() and ~CSdpAttrValueBoolean()
       
   320 //! @SYMTestActions				1. Construct a CSdpAttrValueBoolean object with a TRUE value
       
   321 //!								2. Get the size of CSdpAttrValueBoolean object. Verify the correctness of the size.
       
   322 //!								2. Delete CSdpAttrValueBoolean object
       
   323 //! @SYMTestStatus				Implemented
       
   324 //! @SYMTestPriority			Low
       
   325 //! @SYMTestExpectedResults		Returned CSdpAttrValueBoolean object size successfully
       
   326 //! @SYMTestType				CIT
       
   327 
       
   328 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   329 			CREATE_OBJECT	CSdpAttrValueBoolean	attrvalueboolean	
       
   330 			COMMAND		attrvalueboolean	NewBoolL		BTSDP-AttrValBool-PublicApi-0002-0001command1NewBoolL
       
   331 			COMMAND		attrvalueboolean	DataSize		BTSDP-AttrValBool-PublicApi-0002-0001command2DataSize
       
   332 			COMMAND		attrvalueboolean	~
       
   333 	END_TEST_BLOCK
       
   334 
       
   335 END_TESTCASE BTSDP-AttrValBool-PublicApi-0002
       
   336 
       
   337 
       
   338 START_TESTCASE BTSDP-AttrValBool-PublicApi-0003
       
   339 //! @SYMTestCaseID				BTSDP-AttrValBool-PublicApi-0003
       
   340 //! @SYMAPI						CSdpAttrValueBoolean
       
   341 //! @SYMTestCaseDesc			Get the element type of CSdpAttrValueBoolean
       
   342 //!								Uses API elements: NewBoolL(), Type() and ~CSdpAttrValueBoolean()
       
   343 //! @SYMTestActions				1. Create a CSdpAttrValueBoolean object with a TRUE value
       
   344 //!								2. Get the element type of CSdpAttrValueBoolean object. Verify the correctness of the type.
       
   345 //!								2. Delete CSdpAttrValueBoolean object
       
   346 //! @SYMTestStatus				Implemented
       
   347 //! @SYMTestPriority			High
       
   348 //! @SYMTestExpectedResults		Returned CSdpAttrValueBoolean's element type successfully
       
   349 //! @SYMTestType				CIT
       
   350 
       
   351 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   352 			CREATE_OBJECT	CSdpAttrValueBoolean	attrvalueboolean	
       
   353 			COMMAND		attrvalueboolean	NewBoolL		BTSDP-AttrValBool-PublicApi-0003-0001command1NewBoolL
       
   354 			COMMAND		attrvalueboolean	Type		BTSDP-AttrValBool-PublicApi-0003-0001command2Type
       
   355 			COMMAND		attrvalueboolean	~
       
   356 	END_TEST_BLOCK
       
   357 
       
   358 END_TESTCASE   BTSDP-AttrValBool-PublicApi-0003
       
   359 
       
   360 
       
   361 START_TESTCASE BTSDP-AttrValBool-PublicApi-0004
       
   362 //! @SYMTestCaseID				BTSDP-AttrValBool-PublicApi-0004
       
   363 //! @SYMAPI						CSdpAttrValueBoolean
       
   364 //! @SYMTestCaseDesc			Get CSdpAttrValueBoolean value
       
   365 //!								Uses API elements: NewBoolL(), Bool() and ~CSdpAttrValueBoolean()
       
   366 //! @SYMTestActions				1. Construct a CSdpAttrValueBoolean object with a TRUE value
       
   367 //!								2. Retrieve the bool from CSdpAttrValueBoolean object and verify it contains a TRUE value
       
   368 //!								2. Delete CSdpAttrValueBoolean object
       
   369 //! @SYMTestStatus				Implemented
       
   370 //! @SYMTestPriority			Critical
       
   371 //! @SYMTestExpectedResults		Returned the correct value from CSdpAttrValueBoolean 
       
   372 //! @SYMTestType				CIT
       
   373 
       
   374 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   375 			CREATE_OBJECT	CSdpAttrValueBoolean	attrvalueboolean	
       
   376 			COMMAND		attrvalueboolean	NewBoolL		BTSDP-AttrValBool-PublicApi-0004-0001command1NewBoolL
       
   377 			COMMAND		attrvalueboolean	Bool		BTSDP-AttrValBool-PublicApi-0004-0001command2Bool
       
   378 			COMMAND		attrvalueboolean	~
       
   379 	END_TEST_BLOCK
       
   380 
       
   381 END_TESTCASE BTSDP-AttrValBool-PublicApi-0004
       
   382 
       
   383 // ****************************************************************************
       
   384 // Testing virtual functions inherited from CSdpAttrValue
       
   385 // **************************************************************************** 
       
   386 
       
   387 START_TESTCASE BTSDP-AttrValBool-PublicApi-0005
       
   388 //! @SYMTestCaseID				BTSDP-AttrValBool-PublicApi-0005
       
   389 //! @SYMAPI						CSdpAttrValueBoolean, CSdpAttrValue and MSdpAttributeValueVisitor
       
   390 //! @SYMTestCaseDesc			Request a call back to pass the attribute value
       
   391 //!								Uses API elements: NewBoolL(), AcceptVisitorL(), VisitAttributeValueL() 
       
   392 //!								and ~CSdpAttrValueBoolean()
       
   393 //! @SYMTestActions				1. Create a CSdpAttrValueBoolean object with a TRUE value
       
   394 //!								2. Request a call back to pass CSdpAttrValueBoolean value
       
   395 //!								3. Call MSdpAttributeValueVisitor::VisitAttributeValueL() function to pass
       
   396 //!								   CSdpAttrValueBoolean object itself. Verify the test log contains the correct print out. 
       
   397 //!								4. Delete CSdpAttrValueBoolean object
       
   398 //! @SYMTestStatus				Implemented
       
   399 //! @SYMTestPriority			Critical
       
   400 //! @SYMTestExpectedResults		Shows the correct attribute type and value in test log
       
   401 //! @SYMTestType				CIT
       
   402 
       
   403 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   404 			CREATE_OBJECT	CSdpAttrValueBoolean	attrvalueboolean	
       
   405 			COMMAND		attrvalueboolean	NewBoolL		BTSDP-AttrValBool-PublicApi-0005-0001command1NewBoolL
       
   406 			COMMAND		attrvalueboolean	AcceptVisitorL		BTSDP-AttrValBool-PublicApi-0005-0001command2AcceptVisitorL
       
   407 			COMMAND		attrvalueboolean	~
       
   408 	END_TEST_BLOCK
       
   409 
       
   410 END_TESTCASE   BTSDP-AttrValBool-PublicApi-0005
       
   411 
       
   412 
       
   413 START_TESTCASE BTSDP-AttrValBool-PublicApi-0006
       
   414 //! @SYMTestCaseID				BTSDP-AttrValBool-PublicApi-0006
       
   415 //! @SYMAPI						CSdpAttrValueBoolean and CSdpAttrValue
       
   416 //! @SYMTestCaseDesc			Get the value of the referenced data object from the prewirte buffer
       
   417 //!								Uses API elements: NewBoolL() and Des()
       
   418 //! @SYMTestActions				1. Create a CSdpAttrValueBoolean object with a TRUE value
       
   419 //!								2. Call the virtual function Des() inherited from CSdpAttrValue which causes a panic
       
   420 //! @SYMTestStatus				Implemented
       
   421 //! @SYMTestPriority			Low
       
   422 //! @SYMTestExpectedResults		A panic with a value of 0 should be caught because Des() is a pure virtual function
       
   423 //! @SYMTestType				CIT
       
   424 
       
   425 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   426 			CREATE_OBJECT	CSdpAttrValueBoolean	attrvalueboolean	
       
   427 			COMMAND		attrvalueboolean	NewBoolL		BTSDP-AttrValBool-PublicApi-0006-0001command1NewBoolL
       
   428 			COMMAND		attrvalueboolean	Des
       
   429 	END_TEST_BLOCK	!PanicCode=0	!PanicString=SDP-Database
       
   430 
       
   431 END_TESTCASE   BTSDP-AttrValBool-PublicApi-0006
       
   432 
       
   433 
       
   434 START_TESTCASE BTSDP-AttrValBool-PublicApi-0007
       
   435 //! @SYMTestCaseID				BTSDP-AttrValBool-PublicApi-0007
       
   436 //! @SYMAPI						CSdpAttrValueBoolean and CSdpAttrValue
       
   437 //! @SYMTestCaseDesc			Test if CSdpAttrValueBoolean can hold an integer value
       
   438 //!								Uses API elements: NewBoolL(), DoesIntFit() and ~CSdpAttrValueBoolean
       
   439 //! @SYMTestActions				1. Create a CSdpAttrValueBoolean object with a TRUE value
       
   440 //!								2. Verify that CSdpAttrValueBoolean object cannot fit into an integer. The function 
       
   441 //!								   DoesIntFit should return EFalse.
       
   442 //!								3. Delete CSdpAttrValueBoolean object
       
   443 //! @SYMTestStatus				Implemented
       
   444 //! @SYMTestPriority			Low
       
   445 //! @SYMTestExpectedResults		CSdpAttrValueBoolean object cannot fit into an integer
       
   446 //! @SYMTestType				CIT
       
   447 
       
   448 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   449 			CREATE_OBJECT	CSdpAttrValueBoolean	attrvalueboolean	
       
   450 			COMMAND		attrvalueboolean	NewBoolL		BTSDP-AttrValBool-PublicApi-0007-0001command1NewBoolL
       
   451 			COMMAND		attrvalueboolean	DoesIntFit		BTSDP-AttrValBool-PublicApi-0007-0001command2DoesIntFit
       
   452 			COMMAND		attrvalueboolean	~
       
   453 	END_TEST_BLOCK
       
   454 
       
   455 END_TESTCASE   BTSDP-AttrValBool-PublicApi-0007
       
   456 
       
   457 
       
   458 START_TESTCASE BTSDP-AttrValBool-PublicApi-0008
       
   459 //! @SYMTestCaseID				BTSDP-AttrValBool-PublicApi-0008
       
   460 //! @SYMAPI						CSdpAttrValueBoolean and CSdpAttrValue
       
   461 //! @SYMTestCaseDesc			Test CSdpAttrValue's Int() function
       
   462 //!								Uses API elements: NewBoolL() and Int()
       
   463 //! @SYMTestActions				1. Create a CSdpAttrValueBoolean object with a TRUE value
       
   464 //!								2. Call the virtual function Int() inherited from CSdpAttrValue which causes a panic
       
   465 //! @SYMTestStatus				Implemented
       
   466 //! @SYMTestPriority			Low
       
   467 //! @SYMTestExpectedResults		Caught a panic
       
   468 //! @SYMTestType				CIT
       
   469 
       
   470 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   471 			CREATE_OBJECT	CSdpAttrValueBoolean	attrvalueboolean	
       
   472 			COMMAND		attrvalueboolean	NewBoolL		BTSDP-AttrValBool-PublicApi-0008-0001command1NewBoolL
       
   473 			COMMAND		attrvalueboolean	Int
       
   474 	END_TEST_BLOCK	!PanicCode=0	!PanicString=SDP-Database
       
   475 
       
   476 END_TESTCASE   BTSDP-AttrValBool-PublicApi-0008
       
   477 
       
   478 
       
   479 START_TESTCASE BTSDP-AttrValBool-PublicApi-0009
       
   480 //! @SYMTestCaseID				BTSDP-AttrValBool-PublicApi-0009
       
   481 //! @SYMAPI						CSdpAttrValueBoolean and CSdpAttrValue
       
   482 //! @SYMTestCaseDesc			Test CSdpAttrValue's UUID() function
       
   483 //!								Uses API elements: NewBoolL() and UUID()
       
   484 //! @SYMTestActions				1. Create a CSdpAttrValueBoolean object with a TRUE value
       
   485 //!								2. Call the virtual function UUID() inherited from CSdpAttrValue which causes a panic
       
   486 //! @SYMTestStatus				Implemented
       
   487 //! @SYMTestPriority			Low
       
   488 //! @SYMTestExpectedResults		Caught a panic
       
   489 //! @SYMTestType				CIT
       
   490 
       
   491 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   492 			CREATE_OBJECT	CSdpAttrValueBoolean	attrvalueboolean	
       
   493 			COMMAND		attrvalueboolean	NewBoolL		BTSDP-AttrValBool-PublicApi-0009-0001command1NewBoolL
       
   494 			COMMAND		attrvalueboolean	UUID
       
   495 	END_TEST_BLOCK	!PanicCode=0	!PanicString=SDP-Database
       
   496 
       
   497 END_TESTCASE   BTSDP-AttrValBool-PublicApi-0009
       
   498 
       
   499 
       
   500 START_TESTCASE BTSDP-AttrValBool-PublicApi-0010
       
   501 //! @SYMTestCaseID				BTSDP-AttrValBool-PublicApi-0010
       
   502 //! @SYMAPI						CSdpAttrValueBoolean and CSdpAttrValue
       
   503 //! @SYMTestCaseDesc			Test CSdpAttrValue's Uint() function
       
   504 //!								Uses API elements: NewBoolL() and Uint()
       
   505 //! @SYMTestActions				1. Create a CSdpAttrValueBoolean object with a TRUE value
       
   506 //!								2. Call the virtual function Uint() inherited from CSdpAttrValue which causes a panic
       
   507 //! @SYMTestStatus				Implemented
       
   508 //! @SYMTestPriority			Low
       
   509 //! @SYMTestExpectedResults		Caught a panic
       
   510 //! @SYMTestType				CIT
       
   511 
       
   512 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   513 			CREATE_OBJECT	CSdpAttrValueBoolean	attrvalueboolean	
       
   514 			COMMAND		attrvalueboolean	NewBoolL		BTSDP-AttrValBool-PublicApi-0010-0001command1NewBoolL
       
   515 			COMMAND		attrvalueboolean	Uint
       
   516 	END_TEST_BLOCK	!PanicCode=0	!PanicString=SDP-Database
       
   517 
       
   518 END_TESTCASE   BTSDP-AttrValBool-PublicApi-0010
       
   519 
       
   520 
       
   521 START_TESTCASE BTSDP-AttrValBool-PublicApi-0015
       
   522 //! @SYMTestCaseID				BTSDP-AttrValBool-PublicApi-0015
       
   523 //! @SYMAPI						CSdpAttrValueBoolean and CSdpAttrValue
       
   524 //! @SYMTestCaseDesc			Test for CSdpAttrValueBoolean's deconstructor
       
   525 //!								Uses API elements: ~CSdpAttrValueBoolean()
       
   526 //! @SYMTestActions				1. Calling ~CSdpAttrValueBoolean() without constructing the object first
       
   527 //! @SYMTestStatus				Implemented
       
   528 //! @SYMTestPriority			Low
       
   529 //! @SYMTestExpectedResults		No error or panic
       
   530 //! @SYMTestType				CIT
       
   531 
       
   532 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   533 			CREATE_OBJECT	CSdpAttrValueBoolean	attrvalueboolean	
       
   534 			COMMAND		attrvalueboolean	~
       
   535 	END_TEST_BLOCK
       
   536 
       
   537 END_TESTCASE   BTSDP-AttrValBool-PublicApi-0015
       
   538 
       
   539 
       
   540 
       
   541 
       
   542 // ****************************************************************************
       
   543 // CSdpAttrIdMatchList unconnected tests
       
   544 // **************************************************************************** 
       
   545 
       
   546 START_TESTCASE BTSDP-AttrIdMatchList-PublicApi-0201
       
   547 //! @SYMTestCaseID				BTSDP-AttrIdMatchList-PublicApi-0201
       
   548 //! @SYMAPI						CSdpAttrIdMatchList
       
   549 //! @SYMTestCaseDesc			Creation of an empty CSdpAttrIdMatchList object
       
   550 //!								Uses API elements: NewL() and ~CSdpAttrIdMatchList()
       
   551 //! @SYMTestActions				1. Allocate and construct a new CSdpAttrIdMatchList object. Verify the resulting err code is KErrNone.
       
   552 //!								2. Delete CSdpAttrIdMatchList object
       
   553 //! @SYMTestStatus				Implemented
       
   554 //! @SYMTestPriority			Critical
       
   555 //! @SYMTestExpectedResults		CSdpAttrIdMatchList object is created successfully
       
   556 //! @SYMTestType				CIT
       
   557 
       
   558 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   559 			CREATE_OBJECT	CSdpAttrIdMatchList	attridmatchlist1	
       
   560 			COMMAND		attridmatchlist1	NewL
       
   561 			COMMAND		attridmatchlist1	~
       
   562 	END_TEST_BLOCK
       
   563 
       
   564 END_TESTCASE   BTSDP-AttrIdMatchList-PublicApi-0201
       
   565 
       
   566 
       
   567 
       
   568 START_TESTCASE BTSDP-AttrIdMatchList-PublicApi-0202
       
   569 //! @SYMTestCaseID				BTSDP-AttrIdMatchList-PublicApi-0202
       
   570 //! @SYMAPI						CSdpAttrIdMatchList
       
   571 //! @SYMTestCaseDesc			Creation of a CSdpAttrIdMatchList object as a copy of another CSdpAttrIdMatchList
       
   572 //!								Uses API elements: both versions of NewL() and ~CSdpAttrIdMatchList()
       
   573 //! @SYMTestActions				1. Allocate and construct an empty CSdpAttrIdMatchList object. Verify the resulting err code is KErrNone.
       
   574 //!								2. Allocate and construct a new CSdpAttrIdMatchList object as a copy of
       
   575 //!						   		another CSdpAttrIdMatchList that is created in preceding step
       
   576 //!								3. Delete CSdpAttrIdMatchList object
       
   577 //! @SYMTestStatus				Implemented
       
   578 //! @SYMTestPriority			Critical
       
   579 //! @SYMTestExpectedResults		CSdpAttrIdMatchList object is created successfully
       
   580 //! @SYMTestType				CIT
       
   581 
       
   582 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   583 			CREATE_OBJECT	CSdpAttrIdMatchList	attridmatchlist1	
       
   584 			CREATE_OBJECT	CSdpAttrIdMatchList	attridmatchlist2	
       
   585 			COMMAND		attridmatchlist1	NewL
       
   586 			COMMAND		attridmatchlist2	NewL		BTSDP-AttrIdMatchList-PublicApi-0202-0001command3NewL
       
   587 			COMMAND		attridmatchlist2	~
       
   588 	END_TEST_BLOCK
       
   589 
       
   590 END_TESTCASE BTSDP-AttrIdMatchList-PublicApi-0202
       
   591 
       
   592 
       
   593 START_TESTCASE BTSDP-AttrIdMatchList-PublicApi-0203
       
   594 //! @SYMTestCaseID				BTSDP-AttrIdMatchList-PublicApi-0203
       
   595 //! @SYMAPI						CSdpAttrIdMatchList
       
   596 //! @SYMTestCaseDesc			Add an ID to the list
       
   597 //!								Uses API elements: NewL(), AddL() and ~CSdpAttrIdMatchList()
       
   598 //! @SYMTestActions				1. Allocate and construct an empty CSdpAttrIdMatchList object. Verify the resulting err code is KErrNone.
       
   599 //!								2. Add an ID to the list. Verify the resulting err code is KErrNone.
       
   600 //!								3. Delete CSdpAttrIdMatchList object
       
   601 //! @SYMTestStatus				Implemented
       
   602 //! @SYMTestPriority			Medium
       
   603 //! @SYMTestExpectedResults		The ID is added to the list
       
   604 //! @SYMTestType				CIT
       
   605 
       
   606 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   607 			CREATE_OBJECT	CSdpAttrIdMatchList	attridmatchlist1	
       
   608 			COMMAND		attridmatchlist1	NewL
       
   609 			COMMAND		attridmatchlist1	AddL		BTSDP-AttrIdMatchList-PublicApi-0203-0001command2AddL
       
   610 			COMMAND		attridmatchlist1	~
       
   611 	END_TEST_BLOCK
       
   612 
       
   613 END_TESTCASE   BTSDP-AttrIdMatchList-PublicApi-0203
       
   614 
       
   615 
       
   616 START_TESTCASE BTSDP-AttrIdMatchList-PublicApi-0204
       
   617 //! @SYMTestCaseID				BTSDP-AttrIdMatchList-PublicApi-0204
       
   618 //! @SYMAPI						CSdpAttrIdMatchList
       
   619 //! @SYMTestCaseDesc			Add a range of IDs to the list
       
   620 //!								Uses API elements: NewL(), AddL() and ~CSdpAttrIdMatchList()
       
   621 //! @SYMTestActions				1. Allocate and construct an empty CSdpAttrIdMatchList object. Verify the resulting err code is KErrNone.
       
   622 //!								2. Add a range of IDs to the list. Verify the resulting err code is KErrNone.
       
   623 //!								3. Delete CSdpAttrIdMatchList object
       
   624 //! @SYMTestStatus				Implemented
       
   625 //! @SYMTestPriority			Critical
       
   626 //! @SYMTestExpectedResults		The range of IDs is added to the list
       
   627 //! @SYMTestType				CIT
       
   628 
       
   629 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   630 			CREATE_OBJECT	CSdpAttrIdMatchList	attridmatchlist1	
       
   631 			COMMAND		attridmatchlist1	NewL
       
   632 			COMMAND		attridmatchlist1	AddL		BTSDP-AttrIdMatchList-PublicApi-0204-0001command2AddL
       
   633 			COMMAND		attridmatchlist1	~
       
   634 	END_TEST_BLOCK
       
   635 
       
   636 END_TESTCASE   BTSDP-AttrIdMatchList-PublicApi-0204
       
   637 
       
   638 
       
   639 START_TESTCASE BTSDP-AttrIdMatchList-PublicApi-0205
       
   640 //! @SYMTestCaseID				BTSDP-AttrIdMatchList-PublicApi-0205
       
   641 //! @SYMAPI						CSdpAttrIdMatchList
       
   642 //! @SYMTestCaseDesc			Remove an ID from the list
       
   643 //!								Uses API elements: NewL(), AddL(), RemoveL() and ~CSdpAttrIdMatchList()
       
   644 //! @SYMTestActions				1. Allocate and construct an empty CSdpAttrIdMatchList object. Verify the resulting err code is KErrNone.
       
   645 //!								2. Add a range of IDs to the list. Verify the resulting err code is KErrNone.
       
   646 //!								3. Remove an ID that is within the range of IDs added in step 2. Verify the resulting err code is KErrNone. 
       
   647 //!								4. Delete CSdpAttrIdMatchList object
       
   648 //! @SYMTestStatus				Implemented
       
   649 //! @SYMTestPriority			High
       
   650 //! @SYMTestExpectedResults		The ID is removed from the list
       
   651 //! @SYMTestType				CIT
       
   652 
       
   653 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   654 			CREATE_OBJECT	CSdpAttrIdMatchList	attridmatchlist1	
       
   655 			COMMAND		attridmatchlist1	NewL
       
   656 			COMMAND		attridmatchlist1	AddL		BTSDP-AttrIdMatchList-PublicApi-0205-0001command2AddL
       
   657 			COMMAND		attridmatchlist1	RemoveL		BTSDP-AttrIdMatchList-PublicApi-0205-0001command3RemoveL
       
   658 			COMMAND		attridmatchlist1	~
       
   659 	END_TEST_BLOCK
       
   660 
       
   661 END_TESTCASE   BTSDP-AttrIdMatchList-PublicApi-0205
       
   662 
       
   663 
       
   664 START_TESTCASE BTSDP-AttrIdMatchList-PublicApi-0206
       
   665 //! @SYMTestCaseID				BTSDP-AttrIdMatchList-PublicApi-0206
       
   666 //! @SYMAPI						CSdpAttrIdMatchList
       
   667 //! @SYMTestCaseDesc			Remove a range of IDs from the list
       
   668 //!								Uses API elements: NewL(), AddL(), RemoveL() and ~CSdpAttrIdMatchList()
       
   669 //! @SYMTestActions				1. Allocate and construct an empty CSdpAttrIdMatchList object. Verify the resulting err code is KErrNone.
       
   670 //!								2. Add a range of IDs to the list. Verify the resulting err code is KErrNone.
       
   671 //!								3. Remove a range of IDs that is added in step 2 from the list. Verify the resulting err code is KErrNone.
       
   672 //!								4. Delete CSdpAttrIdMatchList object
       
   673 //! @SYMTestStatus				Implemented
       
   674 //! @SYMTestPriority			Medium
       
   675 //! @SYMTestExpectedResults		The range of IDs is removed from the list
       
   676 //! @SYMTestType				CIT
       
   677 
       
   678 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   679 			CREATE_OBJECT	CSdpAttrIdMatchList	attridmatchlist1	
       
   680 			COMMAND		attridmatchlist1	NewL
       
   681 			COMMAND		attridmatchlist1	AddL		BTSDP-AttrIdMatchList-PublicApi-0206-0001command2AddL
       
   682 			COMMAND		attridmatchlist1	RemoveL		BTSDP-AttrIdMatchList-PublicApi-0206-0001command3RemoveL
       
   683 			COMMAND		attridmatchlist1	~
       
   684 	END_TEST_BLOCK
       
   685 
       
   686 END_TESTCASE   BTSDP-AttrIdMatchList-PublicApi-0206
       
   687 
       
   688 
       
   689 START_TESTCASE BTSDP-AttrIdMatchList-PublicApi-0207
       
   690 //! @SYMTestCaseID				BTSDP-AttrIdMatchList-PublicApi-0207
       
   691 //! @SYMAPI						CSdpAttrIdMatchList
       
   692 //! @SYMTestCaseDesc			Test if the specified attribute ID is in the list
       
   693 //!								Uses API elements: NewL(), AddL(), RemoveL(), InMatchList() and ~CSdpAttrIdMatchList()
       
   694 //! @SYMTestActions				1. Allocate and construct an empty CSdpAttrIdMatchList object. Verify the resulting err code is KErrNone.
       
   695 //!								2. Add a range of IDs to the list. Verify the resulting err code is KErrNone.
       
   696 //!								3. Add an ID to the list. Verify the resulting err code is KErrNone.
       
   697 //!								4. Check if an attribute ID that is added in step 2 is in the list
       
   698 //!								5. Remove a range of IDs that is added the ID in step 2 from the list. Verify the resulting err code is KErrNone.
       
   699 //!								6. Check if the attribute ID is in the list again
       
   700 //!								7. Delete CSdpAttrIdMatchList object
       
   701 //! @SYMTestStatus				Implemented
       
   702 //! @SYMTestPriority			Medium
       
   703 //! @SYMTestExpectedResults		Setp 4 returns True (Attr ID is found), but step 6 returns False (Atttr ID not found)
       
   704 //! @SYMTestType				CIT
       
   705 
       
   706 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   707 			CREATE_OBJECT	CSdpAttrIdMatchList	attridmatchlist1	
       
   708 			COMMAND		attridmatchlist1	NewL
       
   709 			COMMAND		attridmatchlist1	AddL		BTSDP-AttrIdMatchList-PublicApi-0207-0001command2AddL
       
   710 			COMMAND		attridmatchlist1	AddL		BTSDP-AttrIdMatchList-PublicApi-0207-0001command3AddL
       
   711 			COMMAND		attridmatchlist1	InMatchList		BTSDP-AttrIdMatchList-PublicApi-0207-0001command4InMatchList
       
   712 			COMMAND		attridmatchlist1	RemoveL		BTSDP-AttrIdMatchList-PublicApi-0207-0001command5RemoveL
       
   713 			COMMAND		attridmatchlist1	InMatchList		BTSDP-AttrIdMatchList-PublicApi-0207-0001command6InMatchList
       
   714 			COMMAND		attridmatchlist1	~
       
   715 	END_TEST_BLOCK
       
   716 
       
   717 END_TESTCASE   BTSDP-AttrIdMatchList-PublicApi-0207
       
   718 
       
   719 
       
   720 START_TESTCASE BTSDP-AttrIdMatchList-PublicApi-0209
       
   721 //! @SYMTestCaseID				BTSDP-AttrIdMatchList-PublicApi-0209
       
   722 //! @SYMAPI						CSdpAttrIdMatchList
       
   723 //! @SYMTestCaseDesc			Get the number of attributes IDs in the list
       
   724 //!								Uses API elements: NewL(), AddL(), RemoveL(), Count() and ~CSdpAttrIdMatchList()
       
   725 //! @SYMTestActions				1. Allocate and construct an empty CSdpAttrIdMatchList object. Verify the resulting err code is KErrNone.
       
   726 //!								2. Add a range of IDs to the list. Verify the resulting err code is KErrNone.
       
   727 //!								3. Add an ID to the list. Verify the resulting err code is KErrNone.
       
   728 //!								4. Add an ID to the list. Verify the resulting err code is KErrNone.
       
   729 //!								5. Add a range of IDs to the list. Verify the resulting err code is KErrNone.
       
   730 //!								6. Get the number of attributes IDs in the list. Verify the correctness of the number.
       
   731 //!								7. Remove an ID that is added in step 3 from the list. Verify the resulting err code is KErrNone.
       
   732 //!								8. Get the number of attributes IDs in the list. Verify the correctness of the number.
       
   733 //!								9. Delete CSdpAttrIdMatchList object
       
   734 //! @SYMTestStatus				Implemented
       
   735 //! @SYMTestPriority			High
       
   736 //! @SYMTestExpectedResults		Return the correct number of attributes IDs in the list
       
   737 //! @SYMTestType				CIT
       
   738 
       
   739 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   740 			CREATE_OBJECT	CSdpAttrIdMatchList	attridmatchlist1	
       
   741 			COMMAND		attridmatchlist1	NewL
       
   742 			COMMAND		attridmatchlist1	AddL		BTSDP-AttrIdMatchList-PublicApi-0209-0001command2AddL
       
   743 			COMMAND		attridmatchlist1	AddL		BTSDP-AttrIdMatchList-PublicApi-0209-0001command3AddL
       
   744 			COMMAND		attridmatchlist1	AddL		BTSDP-AttrIdMatchList-PublicApi-0209-0001command4AddL
       
   745 			COMMAND		attridmatchlist1	AddL		BTSDP-AttrIdMatchList-PublicApi-0209-0001command5AddL
       
   746 			COMMAND		attridmatchlist1	Count		BTSDP-AttrIdMatchList-PublicApi-0209-0001command6Count
       
   747 			COMMAND		attridmatchlist1	RemoveL		BTSDP-AttrIdMatchList-PublicApi-0209-0001command7RemoveL
       
   748 			COMMAND		attridmatchlist1	Count		BTSDP-AttrIdMatchList-PublicApi-0209-0001command8Count
       
   749 			COMMAND		attridmatchlist1	~
       
   750 	END_TEST_BLOCK
       
   751 
       
   752 END_TESTCASE   BTSDP-AttrIdMatchList-PublicApi-0209
       
   753 
       
   754 
       
   755 START_TESTCASE BTSDP-AttrIdMatchList-PublicApi-0210
       
   756 //! @SYMTestCaseID				BTSDP-AttrIdMatchList-PublicApi-0210
       
   757 //! @SYMAPI						CSdpAttrIdMatchList and MSdpElementBuilder
       
   758 //! @SYMTestCaseDesc			Call MSdpElementBuilder's BuildBooleanL() function to add a Boolean element
       
   759 //!								Uses API elements: NewL(), AddL(), BuildBooleanL() and ~CSdpAttrIdMatchList()
       
   760 //! @SYMTestActions				1. Allocate and construct an empty CSdpAttrIdMatchList object. Verify the resulting err code is KErrNone.
       
   761 //!								2. Add an ID to the list. Verify the resulting err code is KErrNone.
       
   762 //!								3. Call MSdpElementBuilder's BuildBooleanL() function. The error KErrGeneral is expected
       
   763 //!								   from this function call.
       
   764 //!								4. Delete CSdpAttrIdMatchList object
       
   765 //! @SYMTestStatus				Implemented
       
   766 //! @SYMTestPriority			Low
       
   767 //! @SYMTestExpectedResults		Caught the error KErrGeneral
       
   768 //! @SYMTestType				CIT
       
   769 
       
   770 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   771 			CREATE_OBJECT	CSdpAttrIdMatchList	attridmatchlist1	
       
   772 			COMMAND		attridmatchlist1	NewL
       
   773 			COMMAND		attridmatchlist1	AddL		BTSDP-AttrIdMatchList-PublicApi-0210-0001command2AddL
       
   774 			COMMAND	!Error=-2	attridmatchlist1	BuildBooleanL		BTSDP-AttrIdMatchList-PublicApi-0210-0001command3BuildBooleanL
       
   775 			COMMAND		attridmatchlist1	~
       
   776 	END_TEST_BLOCK
       
   777 
       
   778 END_TESTCASE   BTSDP-AttrIdMatchList-PublicApi-0210
       
   779 
       
   780 
       
   781 START_TESTCASE BTSDP-AttrIdMatchList-PublicApi-0211
       
   782 //! @SYMTestCaseID				BTSDP-AttrIdMatchList-PublicApi-0211
       
   783 //! @SYMAPI						CSdpAttrIdMatchList and MSdpElementBuilder
       
   784 //! @SYMTestCaseDesc			Test MSdpElementBuilder's BuildDEAL() function
       
   785 //!								Uses API elements: NewL(), AddL(), BuildDEAL() and ~CSdpAttrIdMatchList()
       
   786 //! @SYMTestActions				1. Allocate and construct an empty CSdpAttrIdMatchList object. Verify the resulting err code is KErrNone.
       
   787 //!								2. Add an ID to the list. Verify the resulting err code is KErrNone.
       
   788 //!								3. Call MSdpElementBuilder's BuildDEAL() function. The error KErrGeneral is expected
       
   789 //!								   from this function call.
       
   790 //!								4. Delete CSdpAttrIdMatchList object
       
   791 //! @SYMTestStatus				Implemented
       
   792 //! @SYMTestPriority			Low
       
   793 //! @SYMTestExpectedResults		Caught the error KErrGeneral
       
   794 //! @SYMTestType				CIT
       
   795 
       
   796 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   797 			CREATE_OBJECT	CSdpAttrIdMatchList	attridmatchlist1	
       
   798 			COMMAND		attridmatchlist1	NewL
       
   799 			COMMAND		attridmatchlist1	AddL		BTSDP-AttrIdMatchList-PublicApi-0211-0001command2AddL
       
   800 			COMMAND	!Error=-2	attridmatchlist1	BuildDEAL
       
   801 			COMMAND		attridmatchlist1	~
       
   802 	END_TEST_BLOCK
       
   803 
       
   804 END_TESTCASE   BTSDP-AttrIdMatchList-PublicApi-0211
       
   805 
       
   806 
       
   807 START_TESTCASE BTSDP-AttrIdMatchList-PublicApi-0212
       
   808 //! @SYMTestCaseID				BTSDP-AttrIdMatchList-PublicApi-0212
       
   809 //! @SYMAPI						CSdpAttrIdMatchList and MSdpElementBuilder
       
   810 //! @SYMTestCaseDesc			Call MSdpElementBuilder's BuildIntL() function to add a signed integer element
       
   811 //!								Uses API elements: NewL(), AddL(), BuildIntL() and ~CSdpAttrIdMatchList()
       
   812 //! @SYMTestActions				1. Allocate and construct an empty CSdpAttrIdMatchList object. Verify the resulting err code is KErrNone.
       
   813 //!								2. Add an ID to the list. Verify the resulting err code is KErrNone.
       
   814 //!								3. Call MSdpElementBuilder's BuildIntL() function. The error KErrGeneral is expected
       
   815 //!								   from this function call.
       
   816 //!								4. Delete CSdpAttrIdMatchList object
       
   817 //! @SYMTestStatus				Implemented
       
   818 //! @SYMTestPriority			Low
       
   819 //! @SYMTestExpectedResults		Caught the error KErrGeneral
       
   820 //! @SYMTestType				CIT
       
   821 
       
   822 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   823 			CREATE_OBJECT	CSdpAttrIdMatchList	attridmatchlist1	
       
   824 			COMMAND		attridmatchlist1	NewL
       
   825 			COMMAND		attridmatchlist1	AddL		BTSDP-AttrIdMatchList-PublicApi-0212-0001command2AddL
       
   826 			COMMAND	!Error=-2	attridmatchlist1	BuildIntL		BTSDP-AttrIdMatchList-PublicApi-0212-0001command3BuildIntL
       
   827 			COMMAND		attridmatchlist1	~
       
   828 	END_TEST_BLOCK
       
   829 
       
   830 END_TESTCASE   BTSDP-AttrIdMatchList-PublicApi-0212
       
   831 
       
   832 
       
   833 START_TESTCASE BTSDP-AttrIdMatchList-PublicApi-0213
       
   834 //! @SYMTestCaseID				BTSDP-AttrIdMatchList-PublicApi-0213
       
   835 //! @SYMAPI						CSdpAttrIdMatchList and MSdpElementBuilder
       
   836 //! @SYMTestCaseDesc			Call MSdpElementBuilder's BuildNilL() function to add a null element
       
   837 //!								Uses API elements: NewL(), AddL(), BuildNilL() and ~CSdpAttrIdMatchList()
       
   838 //! @SYMTestActions				1. Allocate and construct an empty CSdpAttrIdMatchList object.Verify the resulting err code is KErrNone.
       
   839 //!								2. Add an ID to the list.Verify the resulting err code is KErrNone.
       
   840 //!								3. Call MSdpElementBuilder's BuildNilL() function. The error KErrGeneral is expected
       
   841 //!								   from this function call.
       
   842 //!								4. Delete CSdpAttrIdMatchList object
       
   843 //! @SYMTestStatus				Implemented
       
   844 //! @SYMTestPriority			Low
       
   845 //! @SYMTestExpectedResults		Caught the error KErrGeneral
       
   846 //! @SYMTestType				CIT
       
   847 
       
   848 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   849 			CREATE_OBJECT	CSdpAttrIdMatchList	attridmatchlist1	
       
   850 			COMMAND		attridmatchlist1	NewL
       
   851 			COMMAND		attridmatchlist1	AddL		BTSDP-AttrIdMatchList-PublicApi-0213-0001command2AddL
       
   852 			COMMAND	!Error=-2	attridmatchlist1	BuildNilL
       
   853 			COMMAND		attridmatchlist1	~
       
   854 	END_TEST_BLOCK
       
   855 
       
   856 END_TESTCASE   BTSDP-AttrIdMatchList-PublicApi-0213
       
   857 
       
   858 
       
   859 START_TESTCASE BTSDP-AttrIdMatchList-PublicApi-0214
       
   860 //! @SYMTestCaseID				BTSDP-AttrIdMatchList-PublicApi-0214
       
   861 //! @SYMAPI						CSdpAttrIdMatchList and MSdpElementBuilder
       
   862 //! @SYMTestCaseDesc			Call MSdpElementBuilder's BuildStringL() function to add a Text String element
       
   863 //!								Uses API elements: NewL(), AddL(), BuildStringL() and ~CSdpAttrIdMatchList()
       
   864 //! @SYMTestActions				1. Allocate and construct an empty CSdpAttrIdMatchList object. Verify the resulting err code is KErrNone.
       
   865 //!								2. Add an ID to the list. Verify the resulting err code is KErrNone.
       
   866 //!								3. Call MSdpElementBuilder's BuildStringL() function. The error KErrGeneral is expected
       
   867 //!								   from this function call.
       
   868 //!								4. Delete CSdpAttrIdMatchList object
       
   869 //! @SYMTestStatus				Implemented
       
   870 //! @SYMTestPriority			Low
       
   871 //! @SYMTestExpectedResults		Caught the error KErrGeneral
       
   872 //! @SYMTestType				CIT
       
   873 
       
   874 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   875 			CREATE_OBJECT	CSdpAttrIdMatchList	attridmatchlist1	
       
   876 			COMMAND		attridmatchlist1	NewL
       
   877 			COMMAND		attridmatchlist1	AddL		BTSDP-AttrIdMatchList-PublicApi-0214-0001command2AddL
       
   878 			COMMAND	!Error=-2	attridmatchlist1	BuildStringL		BTSDP-AttrIdMatchList-PublicApi-0214-0001command3BuildStringL
       
   879 			COMMAND		attridmatchlist1	~
       
   880 	END_TEST_BLOCK
       
   881 
       
   882 END_TESTCASE   BTSDP-AttrIdMatchList-PublicApi-0214
       
   883 
       
   884 
       
   885 START_TESTCASE BTSDP-AttrIdMatchList-PublicApi-0215
       
   886 //! @SYMTestCaseID				BTSDP-AttrIdMatchList-PublicApi-0215
       
   887 //! @SYMAPI						CSdpAttrIdMatchList and MSdpElementBuilder
       
   888 //! @SYMTestCaseDesc			Call MSdpElementBuilder's BuildURLL() function to add a URL element
       
   889 //!								Uses API elements: NewL(), AddL(), BuildURLL() and ~CSdpAttrIdMatchList()
       
   890 //! @SYMTestActions				1. Allocate and construct an empty CSdpAttrIdMatchList object. Verify the resulting err code is KErrNone.
       
   891 //!								2. Add an ID to the list. Verify the resulting err code is KErrNone.
       
   892 //!								3. Call MSdpElementBuilder's BuildURLL() function. The error KErrGeneral is expected
       
   893 //!								   from this function call.
       
   894 //!								4. Delete CSdpAttrIdMatchList object
       
   895 //! @SYMTestStatus				Implemented
       
   896 //! @SYMTestPriority			Low
       
   897 //! @SYMTestExpectedResults		Caught the error KErrGeneral
       
   898 //! @SYMTestType				CIT
       
   899 
       
   900 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   901 			CREATE_OBJECT	CSdpAttrIdMatchList	attridmatchlist1	
       
   902 			COMMAND		attridmatchlist1	NewL
       
   903 			COMMAND		attridmatchlist1	AddL		BTSDP-AttrIdMatchList-PublicApi-0215-0001command2AddL
       
   904 			COMMAND	!Error=-2	attridmatchlist1	BuildURLL		BTSDP-AttrIdMatchList-PublicApi-0215-0001command3BuildURLL
       
   905 			COMMAND		attridmatchlist1	~
       
   906 	END_TEST_BLOCK
       
   907 
       
   908 END_TESTCASE   BTSDP-AttrIdMatchList-PublicApi-0215
       
   909 
       
   910 
       
   911 START_TESTCASE BTSDP-AttrIdMatchList-PublicApi-0216
       
   912 //! @SYMTestCaseID				BTSDP-AttrIdMatchList-PublicApi-0216
       
   913 //! @SYMAPI						CSdpAttrIdMatchList and MSdpElementBuilder
       
   914 //! @SYMTestCaseDesc			Call MSdpElementBuilder's BuildUUIDL() function to add a UUID element
       
   915 //!								Uses API elements: NewL(), AddL(), BuildUUIDL() and ~CSdpAttrIdMatchList()
       
   916 //! @SYMTestActions				1. Allocate and construct an empty CSdpAttrIdMatchList object. Verify the resulting err code is KErrNone.
       
   917 //!								2. Add an ID to the list. Verify the resulting err code is KErrNone.
       
   918 //!								3. Call MSdpElementBuilder's BuildUUIDL() function. The error KErrGeneral is expected
       
   919 //!								   from this function call.
       
   920 //!								4. Delete CSdpAttrIdMatchList object
       
   921 //! @SYMTestStatus				Implemented
       
   922 //! @SYMTestPriority			Low
       
   923 //! @SYMTestExpectedResults		Caught the error KErrGeneral
       
   924 //! @SYMTestType				CIT
       
   925 
       
   926 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   927 			CREATE_OBJECT	CSdpAttrIdMatchList	attridmatchlist1	
       
   928 			COMMAND		attridmatchlist1	NewL
       
   929 			COMMAND		attridmatchlist1	AddL		BTSDP-AttrIdMatchList-PublicApi-0216-0001command2AddL
       
   930 			COMMAND	!Error=-2	attridmatchlist1	BuildUUIDL		BTSDP-AttrIdMatchList-PublicApi-0216-0001command3BuildUUIDL
       
   931 			COMMAND		attridmatchlist1	~
       
   932 	END_TEST_BLOCK
       
   933 
       
   934 END_TESTCASE   BTSDP-AttrIdMatchList-PublicApi-0216
       
   935 
       
   936 
       
   937 START_TESTCASE BTSDP-AttrIdMatchList-PublicApi-0217
       
   938 //! @SYMTestCaseID				BTSDP-AttrIdMatchList-PublicApi-0217
       
   939 //! @SYMAPI						CSdpAttrIdMatchList and MSdpElementBuilder
       
   940 //! @SYMTestCaseDesc			Call MSdpElementBuilder's BuildUnknownL() function to add an element of any type
       
   941 //!								Uses API elements: NewL(), AddL(), BuildUnknownL() and ~CSdpAttrIdMatchList()
       
   942 //! @SYMTestActions				1. Allocate and construct an empty CSdpAttrIdMatchList object. Verify the resulting err code is KErrNone.
       
   943 //!								2. Add an ID to the list. Verify the resulting err code is KErrNone.
       
   944 //!								3. Call MSdpElementBuilder's BuildUnknownL() function. The error KErrGeneral is expected
       
   945 //!								   from this function call.
       
   946 //!								4. Delete CSdpAttrIdMatchList object
       
   947 //! @SYMTestStatus				Implemented
       
   948 //! @SYMTestPriority			Low
       
   949 //! @SYMTestExpectedResults		Caught the error KErrGeneral
       
   950 //! @SYMTestType				CIT
       
   951 
       
   952 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   953 			CREATE_OBJECT	CSdpAttrIdMatchList	attridmatchlist1	
       
   954 			COMMAND		attridmatchlist1	NewL
       
   955 			COMMAND		attridmatchlist1	AddL		BTSDP-AttrIdMatchList-PublicApi-0217-0001command2AddL
       
   956 			COMMAND	!Error=-2	attridmatchlist1	BuildUnknownL		BTSDP-AttrIdMatchList-PublicApi-0217-0001command3BuildUnknownL
       
   957 			COMMAND		attridmatchlist1	~
       
   958 	END_TEST_BLOCK
       
   959 
       
   960 END_TESTCASE   BTSDP-AttrIdMatchList-PublicApi-0217
       
   961 
       
   962 START_TESTCASE BTSDP-AttrIdMatchList-PublicApi-0218
       
   963 //! @SYMTestCaseID				BTSDP-AttrIdMatchList-PublicApi-0216
       
   964 //! @SYMAPI						CSdpAttrIdMatchList and MSdpElementBuilder
       
   965 //! @SYMTestCaseDesc			Call MSdpElementBuilder's BuildUUIDL() function to add a UUID element
       
   966 //!								Uses API elements: NewL(), AddL(), BuildUUIDL() and ~CSdpAttrIdMatchList()
       
   967 //! @SYMTestActions				1. Allocate and construct an empty CSdpAttrIdMatchList object. Verify the resulting err code is KErrNone.
       
   968 //!								2. Call MSdpElementBuilder's BuildDESL() function and return KErrNone if succeeded
       
   969 //!								3. Delete CSdpAttrIdMatchList object
       
   970 //! @SYMTestStatus				Implemented
       
   971 //! @SYMTestPriority			Low
       
   972 //! @SYMTestExpectedResults		function call should return KErrNone 
       
   973 //! @SYMTestType				CIT
       
   974 
       
   975 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
   976 			CREATE_OBJECT	CSdpAttrIdMatchList	attridmatchlist1	
       
   977 			COMMAND		attridmatchlist1	NewL
       
   978 			COMMAND		attridmatchlist1	BuildDESL
       
   979 			COMMAND		attridmatchlist1	~
       
   980 	END_TEST_BLOCK
       
   981 
       
   982 END_TESTCASE   BTSDP-AttrIdMatchList-PublicApi-0218
       
   983 
       
   984 
       
   985 START_TESTCASE BTSDP-AttrIdMatchList-PublicApi-0219
       
   986 //! @SYMTestCaseID				BTSDP-AttrIdMatchList-PublicApi-0217
       
   987 //! @SYMAPI						CSdpAttrIdMatchList and MSdpElementBuilder
       
   988 //! @SYMTestCaseDesc			Call MSdpElementBuilder's BuildUnknownL() function to add an element of any type
       
   989 //!								Uses API elements: NewL(), AddL(), BuildUnknownL() and ~CSdpAttrIdMatchList()
       
   990 //! @SYMTestActions				1. Allocate and construct an empty CSdpAttrIdMatchList object
       
   991 //!								2. Call MSdpElementBuilder's BuildDESL() function and return KErrNone if succeeded
       
   992 //!								3. Call MSdpElementBuilder's StartListL() function to make the list ready to accept elements.
       
   993 //!								   Return KErrNone if succeeded.
       
   994 //!								4. Add element by calling MSdpElementBuilder's BuildUintL() and return KErrNone if succeeded
       
   995 //!								5. Call CSdpAttrIdMatchList's InMatchList() to find the element added in step 4
       
   996 //! @SYMTestStatus				Implemented
       
   997 //! @SYMTestPriority			Low
       
   998 //! @SYMTestExpectedResults		Uint Element should be added to the list and found by InMatchList()
       
   999 //! @SYMTestType				CIT
       
  1000 
       
  1001 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
  1002 			CREATE_OBJECT	CSdpAttrIdMatchList	attridmatchlist1	
       
  1003 			COMMAND		attridmatchlist1	NewL
       
  1004 			COMMAND		attridmatchlist1	BuildDESL
       
  1005 			COMMAND		attridmatchlist1	StartListL
       
  1006 			COMMAND		attridmatchlist1	BuildUintL		BTSDP-AttrIdMatchList-PublicApi-0219-0001command4BuildUintL
       
  1007 			COMMAND		attridmatchlist1	InMatchList		BTSDP-AttrIdMatchList-PublicApi-0219-0001command5InMatchList
       
  1008 			COMMAND		attridmatchlist1	~
       
  1009 	END_TEST_BLOCK
       
  1010 
       
  1011 END_TESTCASE   BTSDP-AttrIdMatchList-PublicApi-0219
       
  1012 
       
  1013 
       
  1014 START_TESTCASE BTSDP-AttrIdMatchList-PublicApi-0226
       
  1015 //! @SYMTestCaseID				BTSDP-AttrIdMatchList-PublicApi-0226
       
  1016 //! @SYMAPI						CSdpAttrIdMatchList
       
  1017 //! @SYMTestCaseDesc			Test for CSdpAttrIdMatchList's deconstructor
       
  1018 //!								Uses API elements: ~CSdpAttrIdMatchList()
       
  1019 //! @SYMTestActions				1. Call ~CSdpAttrIdMatchList() without constructing the object first
       
  1020 //! @SYMTestStatus				Implemented
       
  1021 //! @SYMTestPriority			Low
       
  1022 //! @SYMTestExpectedResults		no panic or error
       
  1023 //! @SYMTestType				CIT
       
  1024 
       
  1025 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
  1026 			CREATE_OBJECT	CSdpAttrIdMatchList	attridmatchlist1	
       
  1027 			COMMAND		attridmatchlist1	~
       
  1028 	END_TEST_BLOCK
       
  1029 
       
  1030 END_TESTCASE   BTSDP-AttrIdMatchList-PublicApi-0226
       
  1031 
       
  1032 
       
  1033 
       
  1034 
       
  1035 
       
  1036 // ****************************************************************************
       
  1037 // CSdpAgent unconnected tests
       
  1038 // **************************************************************************** 
       
  1039 
       
  1040 
       
  1041 START_TESTCASE	BTSDP-Agent-PublicApi-Unconnected-0301
       
  1042 //! @SYMTestCaseID				BTSDP-Agent-PublicApi-Unconnected-0301
       
  1043 //! @SYMAPI						CSdpAgent
       
  1044 //! @SYMTestCaseDesc			Negative test for CSdpAgent's NewL()
       
  1045 //!								Uses API elements: 	NewL() from CSdpAgent
       
  1046 //! @SYMTestActions				1. Construct a CSdpAgent object with a wrong bt-address. Verify the resulting err code is KErrNone.
       
  1047 //!								2. The NewL() should fail.
       
  1048 //!
       
  1049 //! @SYMTestStatus				Implemented
       
  1050 //! @SYMTestPriority			Medium
       
  1051 //! @SYMTestExpectedResults		NewL() should fail 
       
  1052 //! @SYMTestType				CIT
       
  1053 
       
  1054 	START_TEST_BLOCK	100	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
  1055 			CREATE_OBJECT	CSdpAgent	TBTSdpagent	
       
  1056 			CREATE_OBJECT	CSdpSearchPattern	TBTSearchpattern1	
       
  1057 			CREATE_OBJECT	CSdpAttrValueDES	TBTAttrValueDES1	
       
  1058 			COMMAND		TBTSearchpattern1	NewL
       
  1059 			COMMAND		TBTSearchpattern1	ConstructL
       
  1060 			COMMAND		TBTSearchpattern1	AddL		BTSDP-Agent-PublicApi-Unconnected-0301-0001command4AddL
       
  1061 			COMMAND		TBTAttrValueDES1	NewDESL
       
  1062 			COMMAND		TBTSdpagent	NewL		BTSDP-Agent-PublicApi-Unconnected-0301-0001command8NewL
       
  1063 			COMMAND		TBTSdpagent	SetRecordFilterL		BTSDP-Agent-PublicApi-Unconnected-0301-0001command9SetRecordFilterL
       
  1064 			COMMAND	!AsyncError=-6004	TBTSdpagent	NextRecordRequestL
       
  1065 			OUTSTANDING	10000
       
  1066 			COMMAND		TBTSdpagent	~
       
  1067 	END_TEST_BLOCK
       
  1068 END_TESTCASE	BTSDP-Agent-PublicApi-Unconnected-0301
       
  1069 
       
  1070 
       
  1071 START_TESTCASE BTSDP-AttrIdMatchList-PublicApi-0208
       
  1072 //! @SYMTestCaseID				BTSDP-AttrIdMatchList-PublicApi-0208
       
  1073 //! @SYMAPI						CSdpAttrIdMatchList
       
  1074 //! @SYMTestCaseDesc			Test if the specified attribute ID is in the list, and gets its position
       
  1075 //!								Uses API elements: NewL(), AddL(), RemoveL(), InMatchList() and ~CSdpAttrIdMatchList()
       
  1076 //! @SYMTestActions				1. Allocate and construct an empty CSdpAttrIdMatchList object. Verify the resulting err code is KErrNone.
       
  1077 //!								2. Add a range of IDs to the list. Verify the resulting err code is KErrNone.
       
  1078 //!								3. Add an ID to the list. Verify the resulting err code is KErrNone.
       
  1079 //!								4. Add a range of IDs to the list. Verify the resulting err code is KErrNone.
       
  1080 //!								5. Check if an attribute ID is added in step 3 is in the list, and get
       
  1081 //!						   		   its position.
       
  1082 //!								6. Remove an ID that is added in step 3 from the list. Verify the resulting err code is KErrNone.
       
  1083 //!								7. Check if the attribute ID that is added in step 4 is in the list
       
  1084 //!								8. Delete CSdpAttrIdMatchList object
       
  1085 //! @SYMTestStatus				Implemented
       
  1086 //! @SYMTestPriority			Critical
       
  1087 //! @SYMTestExpectedResults		Attr ID should be found in step 5 and 7. Function returns True and the correct position.
       
  1088 //! @SYMTestType				CIT
       
  1089 
       
  1090 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
  1091 			CREATE_OBJECT	CSdpAttrIdMatchList	attridmatchlist1	
       
  1092 			COMMAND		attridmatchlist1	NewL
       
  1093 			COMMAND		attridmatchlist1	AddL		BTSDP-AttrIdMatchList-PublicApi-0208-0001command2AddL
       
  1094 			COMMAND		attridmatchlist1	AddL		BTSDP-AttrIdMatchList-PublicApi-0208-0001command3AddL
       
  1095 			COMMAND		attridmatchlist1	AddL		BTSDP-AttrIdMatchList-PublicApi-0208-0001command4AddL
       
  1096 			COMMAND		attridmatchlist1	InMatchListRange		BTSDP-AttrIdMatchList-PublicApi-0208-0001command5InMatchListRange
       
  1097 			COMMAND		attridmatchlist1	RemoveL		BTSDP-AttrIdMatchList-PublicApi-0208-0001command6RemoveL
       
  1098 			COMMAND		attridmatchlist1	InMatchListRange		BTSDP-AttrIdMatchList-PublicApi-0208-0001command7InMatchListRange
       
  1099 			COMMAND		attridmatchlist1	~
       
  1100 	END_TEST_BLOCK
       
  1101 
       
  1102 END_TESTCASE   BTSDP-AttrIdMatchList-PublicApi-0208
       
  1103 
       
  1104 
       
  1105 START_TESTCASE BTSDP-AttrIdMatchList-PublicApi-0220
       
  1106 //! @SYMTestCaseID				BTSDP-AttrIdMatchList-PublicApi-0220
       
  1107 //! @SYMAPI						CSdpAttrIdMatchList
       
  1108 //! @SYMTestCaseDesc			Try searching and removing element which doesn't exist in the list
       
  1109 //!								Uses API elements: NewL(), RemoveL(), InMatchListRange() and ~CSdpAttrIdMatchList()
       
  1110 //! @SYMTestActions				1. Allocate and construct an empty CSdpAttrIdMatchList object. Verify the resulting err code is KErrNone.
       
  1111 //!								2. Add a range of IDs to the list. Verify the resulting err code is KErrNone.
       
  1112 //!								3. Search for element which doesn't exist.
       
  1113 //!								4. Remove an element which doesn't exist. Verify the resulting err code is KErrNone.
       
  1114 //!								5. Verify that the element added in step 2 still exists
       
  1115 //!								6. Delete CSdpAttrIdMatchList object
       
  1116 //! @SYMTestStatus				Implemented
       
  1117 //! @SYMTestPriority			Medium
       
  1118 //! @SYMTestExpectedResults		Element which doesn't exist shouldn't be found. RemoveL should have no effect in step 4.
       
  1119 //! @SYMTestType				CIT
       
  1120 
       
  1121 	START_TEST_BLOCK	10	T_BTSdpAPI	\bluetooth\sdp\BTSDP-Agent-PublicApi-Unconnected.ini
       
  1122 			CREATE_OBJECT	CSdpAttrIdMatchList	attridmatchlist1	
       
  1123 			COMMAND		attridmatchlist1	NewL
       
  1124 			COMMAND		attridmatchlist1	AddL		BTSDP-AttrIdMatchList-PublicApi-0220-0001command2AddL
       
  1125 			COMMAND		attridmatchlist1	InMatchListRange		BTSDP-AttrIdMatchList-PublicApi-0220-0001command3InMatchListRange
       
  1126 			COMMAND		attridmatchlist1	RemoveL		BTSDP-AttrIdMatchList-PublicApi-0220-0001command4RemoveL
       
  1127 			COMMAND		attridmatchlist1	InMatchListRange		BTSDP-AttrIdMatchList-PublicApi-0220-0001command5InMatchListRange
       
  1128 			COMMAND		attridmatchlist1	~
       
  1129 	END_TEST_BLOCK
       
  1130 
       
  1131 END_TESTCASE   BTSDP-AttrIdMatchList-PublicApi-0220
       
  1132 
       
  1133 DELAY		2000