bluetoothapitest/bluetoothsvs/T_BTUserAPI/scripts/BT-USER-BluetoothSynchronousLink-PublicApi.script
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothapitest/bluetoothsvs/T_BTUserAPI/scripts/BT-USER-BluetoothSynchronousLink-PublicApi.script Fri Jan 15 08:13:17 2010 +0200
@@ -0,0 +1,491 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+///////////////////////////////////////////////////////////////////////////////
+//! @file
+//! @SYMTestSuiteName T_BTUserAPI
+//! @SYMScriptTestEnvironment This test script requires a basic ROM with bluetooth dongle.
+//! @SYMScriptDescription Tests all public elements of the CBluetoothSynchronousLink classe
+//! as a means of confidence that the API works as expected.
+//! The purpose is to provide a regression test suite of PublishedAll APIs for
+//! BT USER related classes.
+//! Negative testing is performed to confirm that correct errors are returned
+//! when incorrect parameters are given. The tests are fully automated.
+//! @SYMAuthor Paihung Huang
+//! @SYMCreationDate 14/03/2007
+///////////////////////////////////////////////////////////////////////////////
+
+RUN_UTILS MkDir ${SYSDRIVE}\bluetooth\
+RUN_UTILS MkDir ${SYSDRIVE}\bluetooth\user\
+
+LOAD_SUITE T_BTUserAPI
+DELAY 500
+
+
+// ****************************************************************************
+// CBluetoothSynchronousLink
+// ****************************************************************************
+
+START_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0001
+//! @SYMTestCaseID BT-USER-BluetoothSynchronousLink-PublicApi-0001
+//! @SYMAPI CBluetoothSynchronousLink and RSocketServ
+//! @SYMTestCaseDesc Allocate and open a socket sub-session for Bluetooth SCO
+//! Uses API elements: NewL() and destructor from CBluetoothSynchronousLink
+//! RSocketServ(), Connect() and Close() from RSocketServ
+//! @SYMTestActions 1. Create and start a session on the socket server
+//! 2. Open a socket for Bluetooth SCO using NewL() function. Return KErrNone if successful
+//! 3. Delete the socket using destructor
+//! @SYMTestStatus Implemented
+//! @SYMTestPriority Low
+//! @SYMTestExpectedResults Socket for Bluetooth SCO was opened successfully
+//! @SYMTestType CIT
+
+ START_TEST_BLOCK 1000 T_BTUserAPI \bluetooth\user\BT-USER-BluetoothSynchronousLink-PublicApi.ini
+ CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLink1
+ CREATE_OBJECT RSocketServ RSocketServ1
+ COMMAND RSocketServ1 RSocketServ
+ COMMAND RSocketServ1 Connect
+ COMMAND CBluetoothSynchronousLink1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0001-0001command5NewL
+ COMMAND CBluetoothSynchronousLink1 ~
+ COMMAND RSocketServ1 Close
+ END_TEST_BLOCK
+
+END_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0001
+
+
+START_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0002
+//! @SYMTestCaseID BT-USER-BluetoothSynchronousLink-PublicApi-0002
+//! @SYMAPI CBluetoothSynchronousLink and RSocketServ
+//! @SYMTestCaseDesc Allocate and open a socket sub-session for Bluetooth SCO
+//! Uses API elements: NewLC() and destructor from CBluetoothSynchronousLink
+//! RSocketServ(), Connect() and Close() from RSocketServ
+//! @SYMTestActions 1. Create and start a session on the socket server
+//! 2. Open a socket for Bluetooth SCO using NewLC() function. Return KErrNone if successful
+//! 3. Delete the socket using destructor
+//! @SYMTestStatus Implemented
+//! @SYMTestPriority Low
+//! @SYMTestExpectedResults Socket for Bluetooth SCO was opened successfully
+//! @SYMTestType CIT
+
+ START_TEST_BLOCK 1000 T_BTUserAPI \bluetooth\user\BT-USER-BluetoothSynchronousLink-PublicApi.ini
+ CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLink1
+ CREATE_OBJECT RSocketServ RSocketServ1
+ COMMAND RSocketServ1 RSocketServ
+ COMMAND RSocketServ1 Connect
+ COMMAND CBluetoothSynchronousLink1 NewLC BT-USER-BluetoothSynchronousLink-PublicApi-0002-0001command5NewLC
+ COMMAND CBluetoothSynchronousLink1 ~
+ COMMAND RSocketServ1 Close
+ END_TEST_BLOCK
+
+END_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0002
+
+
+START_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0003
+//! @SYMTestCaseID BT-USER-BluetoothSynchronousLink-PublicApi-0003
+//! @SYMAPI CBluetoothSynchronousLink, MBluetoothPhysicalLinksNotifier and RSocketServ
+//! @SYMTestCaseDesc Return a null aObject if the extension is not implemented, or a pointer to another interface if it is
+//! Uses API elements: NewL() and destructor from CBluetoothSynchronousLink
+//! RSocketServ(), Connect() and Close() from RSocketServ
+//! MBSLN_ExtensionInterfaceL() from MBluetoothPhysicalLinksNotifier
+//! @SYMTestActions 1. Create and start a session on the socket server
+//! 2. Open a socket for Bluetooth SCO using NewL() function. Return KErrNone if successful
+//! 3. Verify the pointer returned is null using MBSLN_ExtensionInterfaceL() function.
+//! Return KErrNone if successful
+//! 4. Delete the socket using destructor
+//! @SYMTestStatus Implemented
+//! @SYMTestPriority Low
+//! @SYMTestExpectedResults A null pointer returned
+//! @SYMTestType CIT
+
+ START_TEST_BLOCK 1000 T_BTUserAPI \bluetooth\user\BT-USER-BluetoothSynchronousLink-PublicApi.ini
+ CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLink1
+ CREATE_OBJECT RSocketServ RSocketServ1
+ COMMAND RSocketServ1 RSocketServ
+ COMMAND RSocketServ1 Connect
+ COMMAND CBluetoothSynchronousLink1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0003-0001command5NewL
+ COMMAND CBluetoothSynchronousLink1 MBSLN_ExtensionInterfaceL BT-USER-BluetoothSynchronousLink-PublicApi-0003-0001command6MBSLN_ExtensionInterfaceL
+ COMMAND CBluetoothSynchronousLink1 ~
+ COMMAND RSocketServ1 Close
+ END_TEST_BLOCK
+
+END_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0003
+
+
+// ****************************************************************************
+// Negative test cases
+// ****************************************************************************
+
+START_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0004
+//! @SYMTestCaseID BT-USER-BluetoothSynchronousLink-PublicApi-0004
+//! @SYMAPI CBluetoothSynchronousLink and RSocketServ
+//! @SYMTestCaseDesc Create a synchronous link without an existing physical link
+//! Uses API elements: NewL(), SetupConnection()1 and destructor from CBluetoothSynchronousLink
+//! RSocketServ(), Connect() and Close() from RSocketServ
+//! @SYMTestActions 1. Create and start a session on the socket server
+//! 2. Open a socket for Bluetooth SCO using NewL() function
+//! 3. Create a synchronous link with a device address(22222222) using SetupConnection()1 function.
+//! Return KErrNone if successful
+//! 4. Delete the socket using destructor
+//! @SYMTestStatus Implemented
+//! @SYMTestPriority Low
+//! @SYMTestExpectedResults KErrDisconnected (-36) returned at step 3
+//! @SYMTestType CIT
+
+ START_TEST_BLOCK 1000 T_BTUserAPI \bluetooth\user\BT-USER-BluetoothSynchronousLink-PublicApi.ini
+ CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLink1
+ CREATE_OBJECT RSocketServ RSocketServ1
+ COMMAND RSocketServ1 RSocketServ
+ COMMAND RSocketServ1 Connect
+ COMMAND CBluetoothSynchronousLink1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0004-0001command5NewL
+ COMMAND !Error=-36 CBluetoothSynchronousLink1 SetupConnection BT-USER-BluetoothSynchronousLink-PublicApi-0004-0001command6SetupConnection
+ OUTSTANDING
+ COMMAND CBluetoothSynchronousLink1 ~
+ COMMAND RSocketServ1 Close
+ END_TEST_BLOCK
+
+END_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0004
+
+
+START_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0005
+//! @SYMTestCaseID BT-USER-BluetoothSynchronousLink-PublicApi-0005
+//! @SYMAPI CBluetoothPhysicalLinks, MBluetoothPhysicalLinksNotifier, CBluetoothSynchronousLink and RSocketServ
+//! @SYMTestCaseDesc Create a synchronous link with a ACL packet types
+//! Uses API elements: NewL() and CreateConnection() from CBluetoothPhysicalLinks
+//! HandleCreateConnectionCompleteL() from MBluetoothPhysicalLinksNotifier
+//! NewL() and SetupConnection()2 from CBluetoothSynchronousLink
+//! RSocketServ() and Connect() from RSocketServ
+//! @SYMTestActions 1. Create and start a session on the socket server
+//! 2. Open a Bluetooth socket using NewL() function
+//! 3. Bring in a new member to the piconet with a device address(22222222) using
+//! CreateConnection() function. Return KErrNone if successful
+//! 4. Return callback HandleCreateConnectionCompleteL() function
+//! 5. Verify that if return result (-6004) from callback function is as expected (-6004)
+//! 6. Open a socket for Bluetooth SCO using NewL() function
+//! 7. Create a synchronous link with a device address(22222222) and EPacketsDM1 using
+//! SetupConnection()2 function
+//! @SYMTestStatus Implemented
+//! @SYMTestPriority Low
+//! @SYMTestExpectedResults Panic at step 5
+//! @SYMTestType CIT
+
+ START_TEST_BLOCK 1000 T_BTUserAPI \bluetooth\user\BT-USER-BluetoothSynchronousLink-PublicApi.ini
+ CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLink1
+ CREATE_OBJECT CBluetoothPhysicalLinks CBluetoothPhysicalLinks1
+ CREATE_OBJECT RSocketServ RSocketServ1
+ COMMAND RSocketServ1 RSocketServ
+ COMMAND RSocketServ1 Connect
+ COMMAND CBluetoothPhysicalLinks1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0005-0001command5NewL
+ COMMAND !AsyncError=-6004 CBluetoothPhysicalLinks1 CreateConnection BT-USER-BluetoothSynchronousLink-PublicApi-0005-0001command6CreateConnection
+ OUTSTANDING
+ COMMAND CBluetoothSynchronousLink1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0005-0001command8NewL
+ COMMAND CBluetoothSynchronousLink1 SetupConnection BT-USER-BluetoothSynchronousLink-PublicApi-0005-0001command9SetupConnection
+ OUTSTANDING
+ END_TEST_BLOCK !PanicCode=6 !PanicString=BTSocket
+
+END_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0005
+
+
+START_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0006
+//! @SYMTestCaseID BT-USER-BluetoothSynchronousLink-PublicApi-0006
+//! @SYMAPI CBluetoothPhysicalLinks, MBluetoothPhysicalLinksNotifier, CBluetoothSynchronousLink and RSocketServ
+//! @SYMTestCaseDesc Cancel creating a synchronous link before setting up the connection
+//! Uses API elements: NewL(), CreateConnection() and destructor from CBluetoothPhysicalLinks
+//! HandleCreateConnectionCompleteL() from MBluetoothPhysicalLinksNotifier
+//! NewL(), CancelSetup() and destructor from CBluetoothSynchronousLink
+//! RSocketServ(), Connect() and Close() from RSocketServ
+//! @SYMTestActions 1. Create and start a session on the socket server
+//! 2. Open a Bluetooth socket using NewL() function
+//! 3. Bring in a new member to the piconet with a device address(22222222) using
+//! CreateConnection() function. Return KErrNone if successful
+//! 4. Return callback HandleCreateConnectionCompleteL() function
+//! 5. Verify that if return result (-6004) from callback function is as expected (-6004)
+//! 6. Open a socket for Bluetooth SCO using NewL() function
+//! 7. Cancel creating a synchronous link using CancelSetup() function
+//! 8. Delete the socket using destructor
+//! @SYMTestStatus Implemented
+//! @SYMTestPriority Low
+//! @SYMTestExpectedResults Cancelled the synchronous link
+//! @SYMTestType CIT
+
+ START_TEST_BLOCK 1000 T_BTUserAPI \bluetooth\user\BT-USER-BluetoothSynchronousLink-PublicApi.ini
+ CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLink1
+ CREATE_OBJECT CBluetoothPhysicalLinks CBluetoothPhysicalLinks1
+ CREATE_OBJECT RSocketServ RSocketServ1
+ COMMAND RSocketServ1 RSocketServ
+ COMMAND RSocketServ1 Connect
+ COMMAND CBluetoothPhysicalLinks1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0006-0001command5NewL
+ COMMAND !AsyncError=-6004 CBluetoothPhysicalLinks1 CreateConnection BT-USER-BluetoothSynchronousLink-PublicApi-0006-0001command6CreateConnection
+ OUTSTANDING
+ COMMAND CBluetoothSynchronousLink1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0006-0001command8NewL
+ COMMAND CBluetoothSynchronousLink1 CancelSetup
+ COMMAND CBluetoothSynchronousLink1 ~
+ COMMAND CBluetoothPhysicalLinks1 ~
+ COMMAND RSocketServ1 Close
+ END_TEST_BLOCK
+
+END_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0006
+
+
+START_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0007
+//! @SYMTestCaseID BT-USER-BluetoothSynchronousLink-PublicApi-0007
+//! @SYMAPI CBluetoothPhysicalLinks, MBluetoothPhysicalLinksNotifier, CBluetoothSynchronousLink and RSocketServ
+//! @SYMTestCaseDesc Disconnect a synchronous link before setting up the connection
+//! Uses API elements: NewL(), CreateConnection() and destructor from CBluetoothPhysicalLinks
+//! HandleCreateConnectionCompleteL() from MBluetoothPhysicalLinksNotifier
+//! NewL(), Disconnect() and destructor from CBluetoothSynchronousLink
+//! RSocketServ(), Connect() and Close() from RSocketServ
+//! @SYMTestActions 1. Create and start a session on the socket server
+//! 2. Open a Bluetooth socket using NewL() function
+//! 3. Bring in a new member to the piconet with a device address(11111111) using
+//! CreateConnection() function. Return KErrNone if successful
+//! 4. Return callback HandleCreateConnectionCompleteL() function
+//! 5. Verify that if return result (-6004) from callback function is as expected (-6004)
+//! 6. Open a socket for Bluetooth SCO using NewL() function
+//! 7. Disconnect a synchronous link using Disconnect() function. Return KErrNone if successful
+//! 8. Delete the socket using destructor
+//! @SYMTestStatus Implemented
+//! @SYMTestPriority Low
+//! @SYMTestExpectedResults KErrDisconnected (-36) returned at step 5
+//! @SYMTestType CIT
+
+ START_TEST_BLOCK 1000 T_BTUserAPI \bluetooth\user\BT-USER-BluetoothSynchronousLink-PublicApi.ini
+ CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLink1
+ CREATE_OBJECT CBluetoothPhysicalLinks CBluetoothPhysicalLinks1
+ CREATE_OBJECT RSocketServ RSocketServ1
+ COMMAND RSocketServ1 RSocketServ
+ COMMAND RSocketServ1 Connect
+ COMMAND CBluetoothPhysicalLinks1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0007-0001command5NewL
+ COMMAND !AsyncError=-6004 CBluetoothPhysicalLinks1 CreateConnection BT-USER-BluetoothSynchronousLink-PublicApi-0007-0001command6CreateConnection
+ OUTSTANDING
+ COMMAND CBluetoothSynchronousLink1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0007-0001command8NewL
+ COMMAND !Error=-36 CBluetoothSynchronousLink1 Disconnect BT-USER-BluetoothSynchronousLink-PublicApi-0007-0001command9Disconnect
+ OUTSTANDING
+ COMMAND CBluetoothSynchronousLink1 ~
+ COMMAND CBluetoothPhysicalLinks1 ~
+ COMMAND RSocketServ1 Close
+ END_TEST_BLOCK
+
+END_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0007
+
+
+START_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0008
+//! @SYMTestCaseID BT-USER-BluetoothSynchronousLink-PublicApi-0008
+//! @SYMAPI CBluetoothSynchronousLink, CBluetoothPhysicalLinks, MBluetoothPhysicalLinksNotifier, RSocketServ
+//! @SYMTestCaseDesc Prepare for a remote device to set up a synchronous link on the local device
+//! Uses API elements: NewL() and CreateConnection() from CBluetoothPhysicalLinks
+//! HandleCreateConnectionCompleteL() from MBluetoothPhysicalLinksNotifier
+//! NewL() and AcceptConnection()2 from CBluetoothSynchronousLink
+//! RSocketServ() and Connect() from RSocketServ
+//! @SYMTestActions 1. Create and start a session on the socket server
+//! 2. Open a Bluetooth socket using NewL() function
+//! 3. Bring in a new member to the piconet with a device address(11111111) using
+//! CreateConnection() function. Return KErrNone if successful
+//! 4. Return callback HandleCreateConnectionCompleteL() function
+//! 5. Verify that if return result (-6004) from callback function is as expected (-6004)
+//! 6. Open a socket for Bluetooth SCO using NewL() function
+//! 7. Prepare for a remote device to set up a synchronous link on the local device with
+//! EPacketsHV3 using AcceptConnection()2 function
+//! @SYMTestStatus Implemented
+//! @SYMTestPriority Low
+//! @SYMTestExpectedResults KErrDisconnected (-36) returned at step 4
+//! @SYMTestType CIT
+
+ START_TEST_BLOCK 1000 T_BTUserAPI \bluetooth\user\BT-USER-BluetoothSynchronousLink-PublicApi.ini
+ CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLink1
+ CREATE_OBJECT CBluetoothPhysicalLinks CBluetoothPhysicalLinks1
+ CREATE_OBJECT RSocketServ RSocketServ1
+ CREATE_OBJECT TBTSyncPackets TBTSyncPackets1
+ COMMAND RSocketServ1 RSocketServ
+ COMMAND RSocketServ1 Connect
+ COMMAND TBTSyncPackets1 TBTSyncPackets BT-USER-BluetoothSynchronousLink-PublicApi-0008-0001command3TBTSyncPackets
+ COMMAND CBluetoothPhysicalLinks1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0008-0001command4NewL
+ COMMAND !AsyncError=-6004 CBluetoothPhysicalLinks1 CreateConnection BT-USER-BluetoothSynchronousLink-PublicApi-0008-0001command5CreateConnection
+ OUTSTANDING
+ COMMAND CBluetoothSynchronousLink1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0008-0001command6NewL
+ COMMAND CBluetoothSynchronousLink1 AcceptConnection BT-USER-BluetoothSynchronousLink-PublicApi-0008-0001command7AcceptConnection
+ END_TEST_BLOCK
+END_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0008
+
+//!START_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0009
+//! @SYMTestCaseID BT-USER-BluetoothSynchronousLink-PublicApi-0009
+//! @SYMAPI CBluetoothSynchronousLink, TBTSyncPackets
+//! @SYMTestCaseDesc Create a synchronous link on an EXISTING physical link without a connected session on the socket server
+//! Uses API elements: NewL() and SetupConnection()3 from CBluetoothSynchronousLink
+//! TBTSyncPackets() from TBTSyncPackets
+//! @SYMTestActions 1. Construct a synchronous packet type (ESyncPacketsHV1) using TBTSyncPackets() function
+//! 2. Open a socket for Bluetooth SCO using NewL() function
+//! 3. Create a synchronous link on an EXISTING physical link with a device address(11111111)
+//! and a SCO packet type(ESyncPacketsHV1) using SetupConnection()3 function
+//! @SYMTestStatus Implemented
+//! @SYMTestPriority Low
+//! @SYMTestExpectedResults Panic at step 3
+//! @SYMTestType CIT
+
+//! START_TEST_BLOCK 1000 T_BTUserAPI \bluetooth\user\BT-USER-BluetoothSynchronousLink-PublicApi.ini
+//! CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLink1
+//! CREATE_OBJECT RSocketServ RSocketServ1
+//! CREATE_OBJECT TBTSyncPackets TBTSyncPackets1
+//! COMMAND TBTSyncPackets1 TBTSyncPackets BT-USER-BluetoothSynchronousLink-PublicApi-0009-0001command2TBTSyncPackets
+//! COMMAND CBluetoothSynchronousLink1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0009-0001command4NewL
+//! COMMAND CBluetoothSynchronousLink1 SetupConnection BT-USER-BluetoothSynchronousLink-PublicApi-0009-0001command5SetupConnection
+//! OUTSTANDING
+//! END_TEST_BLOCK !PanicCode=3 !PanicString=KERN-EXEC
+
+//!END_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0009
+
+
+//!START_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0010
+//! @SYMTestCaseID BT-USER-BluetoothSynchronousLink-PublicApi-0010
+//! @SYMAPI CBluetoothSynchronousLink
+//! @SYMTestCaseDesc Create a synchronous link on an EXISTING physical link without a connected session on the socket server
+//! Uses API elements: NewLC() and SetupConnection()1
+//! @SYMTestActions 1. Open a socket for Bluetooth SCO using NewLC() function
+//! 2. Create a synchronous link on an EXISTING physical link with a device address(11111111)
+//! using SetupConnection()1 function
+//! @SYMTestStatus Implemented
+//! @SYMTestPriority Low
+//! @SYMTestExpectedResults Panic at step 2
+//! @SYMTestType CIT
+
+//! START_TEST_BLOCK 1000 T_BTUserAPI \bluetooth\user\BT-USER-BluetoothSynchronousLink-PublicApi.ini
+//! CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLink1
+//! CREATE_OBJECT RSocketServ RSocketServ1
+//! COMMAND CBluetoothSynchronousLink1 NewLC BT-USER-BluetoothSynchronousLink-PublicApi-0010-0001command2NewLC
+//! COMMAND CBluetoothSynchronousLink1 SetupConnection BT-USER-BluetoothSynchronousLink-PublicApi-0010-0001command3SetupConnection
+//! OUTSTANDING
+//! END_TEST_BLOCK !PanicCode=3 !PanicString=KERN-EXEC
+
+//!END_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0010
+
+
+START_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0011
+//! @SYMTestCaseID BT-USER-BluetoothSynchronousLink-PublicApi-0011
+//! @SYMAPI CBluetoothSynchronousLink, RSocketServ, TBTSyncPackets
+//! @SYMTestCaseDesc Setup a synchronous link without creating a physical link
+//! Uses API elements: NewL(), SetupConnection()3 and destructor from CBluetoothSynchronousLink
+//! RSocketServ(), Connect() and Close() from RSocketServ
+//! TBTSyncPackets() and Connect() from TBTSyncPackets
+//! @SYMTestActions 1. Construct a synchronous packet type (ESyncAnyESCOPacket) using TBTSyncPackets() function
+//! 2. Create and start a session on the socket server
+//! 3. Open a socket for Bluetooth SCO using NewL() function
+//! 4. Create a synchronous link on an EXISTING physical link with a device address(11111111)
+//! and a SCO packet type(ESyncAnyESCOPacket) using SetupConnection()3 function
+//! 5. Delete the synchronous link using destructor
+//! 6. Close the session on the socket server
+//! @SYMTestStatus Implemented
+//! @SYMTestPriority Low
+//! @SYMTestExpectedResults KErrDisconnected (-36) returned at step 4
+//! @SYMTestType CIT
+
+ START_TEST_BLOCK 1000 T_BTUserAPI \bluetooth\user\BT-USER-BluetoothSynchronousLink-PublicApi.ini
+ CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLink1
+ CREATE_OBJECT RSocketServ RSocketServ1
+ CREATE_OBJECT TBTSyncPackets TBTSyncPackets1
+ COMMAND TBTSyncPackets1 TBTSyncPackets BT-USER-BluetoothSynchronousLink-PublicApi-0011-0001command2TBTSyncPackets
+ COMMAND RSocketServ1 RSocketServ
+ COMMAND RSocketServ1 Connect
+ COMMAND CBluetoothSynchronousLink1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0011-0001command7NewL
+ COMMAND !Error=-36 CBluetoothSynchronousLink1 SetupConnection BT-USER-BluetoothSynchronousLink-PublicApi-0011-0001command8SetupConnection
+ OUTSTANDING
+ COMMAND CBluetoothSynchronousLink1 ~
+ COMMAND RSocketServ1 Close
+ END_TEST_BLOCK
+
+END_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0011
+
+
+START_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0012
+//! @SYMTestCaseID BT-USER-BluetoothSynchronousLink-PublicApi-0012
+//! @SYMAPI CBluetoothSynchronousLink, CBluetoothPhysicalLinks, MBluetoothPhysicalLinksNotifier, RSocketServ
+//! @SYMTestCaseDesc Cancel ability to respond to a remote request without creating a synchronous link
+//! Uses API elements: NewL(), CreateConnection() and destructor from CBluetoothPhysicalLinks
+//! HandleCreateConnectionCompleteL() from MBluetoothPhysicalLinksNotifier
+//! NewL(), CancelAccept() and destructor from CBluetoothSynchronousLink
+//! RSocketServ(), Connect() and Close() from RSocketServ
+//! @SYMTestActions 1. Create and start a session on the socket server
+//! 2. Open a Bluetooth socket using NewL() function
+//! 3. Bring in a new member to the piconet with a device address(11111111) using
+//! CreateConnection() function. Return KErrNone if successful
+//! 4. Return callback HandleCreateConnectionCompleteL() function
+//! 5. Verify that if return result (-6004) from callback function is as expected (-6004)
+//! 6. Open a socket for Bluetooth SCO using NewL() function
+//! 7. Cancel ability to respond to a remote request to set up a synchronous link using
+//! CancelAccept() function
+//! 8. Delete the synchronous link using destructor
+//! 9. Delete the socket using destructor
+//! 10. Close the session on the socket server
+//! @SYMTestStatus Implemented
+//! @SYMTestPriority Low
+//! @SYMTestExpectedResults Cancel succeeded
+//! @SYMTestType CIT
+
+ START_TEST_BLOCK 1000 T_BTUserAPI \bluetooth\user\BT-USER-BluetoothSynchronousLink-PublicApi.ini
+ CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLink1
+ CREATE_OBJECT CBluetoothPhysicalLinks CBluetoothPhysicalLinks1
+ CREATE_OBJECT RSocketServ RSocketServ1
+ COMMAND RSocketServ1 RSocketServ
+ COMMAND RSocketServ1 Connect
+ COMMAND CBluetoothPhysicalLinks1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0012-0001command5NewL
+ COMMAND !AsyncError=-6004 CBluetoothPhysicalLinks1 CreateConnection BT-USER-BluetoothSynchronousLink-PublicApi-0012-0001command6CreateConnection
+ OUTSTANDING
+ COMMAND CBluetoothSynchronousLink1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0012-0001command8NewL
+ COMMAND CBluetoothSynchronousLink1 CancelAccept
+ COMMAND CBluetoothSynchronousLink1 ~
+ COMMAND CBluetoothPhysicalLinks1 ~
+ COMMAND RSocketServ1 Close
+ END_TEST_BLOCK
+
+END_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0012
+
+
+START_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0013
+//! @SYMTestCaseID BT-USER-BluetoothSynchronousLink-PublicApi-0013
+//! @SYMAPI CBluetoothPhysicalLinks, MBluetoothPhysicalLinksNotifier, CBluetoothSynchronousLink, RSocketServ
+//! @SYMTestCaseDesc Get the socket address of the remote Bluetooth device without creating a synchronous link
+//! Uses API elements: NewL() and CreateConnection() from CBluetoothPhysicalLinks
+//! HandleCreateConnectionCompleteL() from MBluetoothPhysicalLinksNotifier
+//! NewL() and RemoteName() from CBluetoothSynchronousLink
+//! RSocketServ() and Connect() from RSocketServ
+//! @SYMTestActions 1. Create and start a session on the socket server
+//! 2. Open a Bluetooth socket using NewL() function
+//! 3. Bring in a new member to the piconet with a device address(11111111) using
+//! CreateConnection() function. Return KErrNone if successful
+//! 4. Return callback HandleCreateConnectionCompleteL() function
+//! 5. Verify that if return result (-6004) from callback function is as expected (-6004)
+//! 6. Open a socket for Bluetooth SCO using NewL() function
+//! 7. Get the socket address of the remote Bluetooth device using RemoteName() function
+//! @SYMTestStatus Implemented
+//! @SYMTestPriority Low
+//! @SYMTestExpectedResults Panic at step 5
+//! @SYMTestType CIT
+
+ START_TEST_BLOCK 1000 T_BTUserAPI \bluetooth\user\BT-USER-BluetoothSynchronousLink-PublicApi.ini
+ CREATE_OBJECT CBluetoothPhysicalLinks CBluetoothPhysicalLinksData
+ CREATE_OBJECT RSocketServ RSocketServData
+ CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLinkData
+ COMMAND RSocketServData RSocketServ
+ COMMAND RSocketServData Connect
+ COMMAND CBluetoothPhysicalLinksData NewL BT-USER-BluetoothSynchronousLink-PublicApi-0013-0001command5NewL
+ COMMAND !AsyncError=-6004 CBluetoothPhysicalLinksData CreateConnection BT-USER-BluetoothSynchronousLink-PublicApi-0013-0001command6CreateConnection
+ OUTSTANDING
+ COMMAND CBluetoothSynchronousLinkData NewL BT-USER-BluetoothSynchronousLink-PublicApi-0013-0001command9NewL
+ COMMAND CBluetoothSynchronousLinkData RemoteName BT-USER-BluetoothSynchronousLink-PublicApi-0013-0001command10RemoteName
+ END_TEST_BLOCK !PanicCode=6 !PanicString=BTSocket
+
+END_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0013
+
+
+DELAY 2000
+