bluetoothapitest/bluetoothsvs/T_BTUserAPI/scripts/BT-USER-AccessRequirements-PublicApi-Active-Master.script
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 27 Apr 2010 17:48:21 +0300
branchRCL_3
changeset 14 f8503e232b0c
parent 0 29b1cd4cb562
permissions -rw-r--r--
Revision: 201011 Kit: 201017

//
// 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 TBTAccessRequirements class
//!								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					Cliff Chuang
//! @SYMCreationDate			21/09/2007
///////////////////////////////////////////////////////////////////////////////

RUN_UTILS MkDir ${SYSDRIVE}\bluetooth\
RUN_UTILS MkDir ${SYSDRIVE}\bluetooth\user\

LOAD_SUITE	UCCControlTE
LOAD_SUITE	T_BTUserAPI	-SharedData
DELAY		2000

RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\user\UccControlChannelConfig.ini StartSyncService
RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\user\UccControlChannelConfig.ini StartTDService
RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\user\UccControlChannelConfig.ini BuildRunAccessPassiveSlave

DELAY		5000
// ****************************************************************************
// TBTAccessRequirements - Master (Auto Tests)
// ****************************************************************************	 

START_TESTCASE BT-USER-AccessRequirements-PublicApi-Active-Master-0001
//! @SYMTestCaseID				BT-USER-AccessRequirements-PublicApi-Active-Master-0001
//! @SYMAPI						CBluetoothSocket, TBTDevAddr, RHostResolver, TRfcommSockAddr, TBTAccessRequirements, TBTServiceSecurity
//! @SYMTestCaseDesc			Open a connection to a specific Bluetooth device
//!								Set SetEncryption() to FALSE
//!								Set SetDenied() to FALSE
//!								Set SetPasskeyMinLength() to 4
//!								Set SetAuthentication() to FALSE
//!								Set SetAuthorisation() to FALS
//!								Connection creates with those setting successfully and test case passes without any error.
//!								Uses API elements: 	NewL()1, Connect()1 and Shutdown() from CBluetoothSocket
//!													TBTDevAddr() from TBTDevAddr
//!													Open(), SetHostName(), GetDeviceAddress() from RHostResolver
//!													TRfcommSockAddr(), SetSecurity(), SetBTAddr(), BTAddr(), SetPort() from TRfcommSockAddr
//!													SetEncryption(), SetDenied(), SetPasskeyMinLength(), SetAuthentication() and SetAuthorisation() from TBTAccessRequirements
//! @SYMTestActions				1. Order slave to set up connection
//!								2. Get result from slave to wait for it to be ready
//!								3. Create a connection to the RSocket server
//!								4. Create the CBluetoothSocket object using NewL()1 (Standard constructor)
//!								5. Create an empty TBTServiceSecurity object
//!								6. Set the encryption requirement using SetEncryption() function (FALSE)
//!								7. Set the denied requirement using SetDenied() function (FALSE)
//!								8. Set the minimal length requrement for passkey using SetPasskeyMinLength() function (4)
//!								9. Set the authentication requirement using SetAuthentication() function (FALSE)
//!								10. Set the authorisation requirement using SetAuthorisation() function (FALSE)
//!								11. Create an empty TBTDevAddr object (slave)
//!								12. Create and initialise an RHostResolver
//!								13. Set Hostname (MasterDevice) of the device
//!								14. Get the slave device address
//!								15. Create a TRfcommSockAddr object
//!								16. Set the Security of the TRfcommSockAddr (Use default/empty as on server)
//!								17. Set the BT address of the TRfcommSockAddr to the one of the Casira pod of the slave that we connect to
//!								18. Verify the set BT Address
//!								19. Set the port to the specific one of the protocol we use
//!								20. Use the TRfcommSockAddr in the connect of the CBluetoothSocket object
//!								21. Shut down the CBluetoothSocket object
//!								22. Delete CBluetoothSocket object
//!
//! @SYMTestStatus				Implemented
//! @SYMTestPriority			Critical
//! @SYMTestExpectedResults		Connection creates successfully and closes successfully.
//! @SYMTestType				CIT

	START_TEST_BLOCK	500	T_BTUserAPI	\bluetooth\user\BT-USER-AccessRequirements-PublicApi-Active-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
			COMMAND		CBluetoothSocket1	RSocketServerConnect		
			COMMAND		CBluetoothSocket1	NewL		BT-USER-AccessRequirements-PublicApi-Active-0001-0001command2NewL
			COMMAND		TBTServiceSecurity1	Construct		
			COMMAND		TBTServiceSecurity1	SetEncryption		BT-USER-AccessRequirements-PublicApi-Active-0001-0001command5SetEncryption
			COMMAND		TBTServiceSecurity1	SetDenied		BT-USER-AccessRequirements-PublicApi-Active-0001-0001command6SetDenied
			COMMAND		TBTServiceSecurity1	SetPasskeyMinLength	BT-USER-AccessRequirements-PublicApi-Active-0001-0001command7SetPasskeyMinLength
			COMMAND		TBTServiceSecurity1	SetAuthentication	BT-USER-AccessRequirements-PublicApi-Active-0001-0001command8SetAuthentication					
			COMMAND		TBTServiceSecurity1	SetAuthorisation	BT-USER-AccessRequirements-PublicApi-Active-0001-0001command9SetAuthorisation	
			STORE	CBluetoothSocket1	
			STORE	TBTServiceSecurity1	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	DELAY	2000
	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\user\UccControlChannelConfig.ini StartSyncTestCase
	DELAY	5000
	START_TEST_BLOCK	500	T_BTUserAPI	\bluetooth\user\BT-USER-AccessRequirements-PublicApi-Active-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
			COMMAND		TBTDevAddrRemote	Construct		
			COMMAND		TBTDevAddrRemote	OpenHostResolver	BT-USER-AccessRequirements-PublicApi-Active-0001-0002command3OpenHostResolver
			COMMAND		TBTDevAddrRemote	SetHostNameL		BT-USER-AccessRequirements-PublicApi-Active-0001-0002command4SetHostNameL
			COMMAND		TBTDevAddrRemote	GetDeviceAddress	BT-USER-AccessRequirements-PublicApi-Active-0001-0002command5GetDeviceAddress
			OUTSTANDING
			COMMAND		TRfcommSockAddr1	Construct		
			COMMAND		TRfcommSockAddr1	SetSecurity	BT-USER-AccessRequirements-PublicApi-Active-0001-0002command8SetSecurity
			COMMAND		TRfcommSockAddr1	SetBTAddr	BT-USER-AccessRequirements-PublicApi-Active-0001-0002command9SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-AccessRequirements-PublicApi-Active-0001-0002command10BTAddr
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-AccessRequirements-PublicApi-Active-0001-0002command11SetPort
			STORE	CBluetoothSocket1	
			STORE	TRfcommSockAddr1	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\user\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
	DELAY	2000
	
	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\user\UccControlChannelConfig.ini StartSyncTestCase
	DELAY	5000
	START_TEST_BLOCK	2000	T_BTUserAPI	\bluetooth\user\BT-USER-AccessRequirements-PublicApi-Active-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	TRfcommSockAddr		TRfcommSockAddr1
			COMMAND		CBluetoothSocket1	Connect		BT-USER-AccessRequirements-PublicApi-Active-0001-0003command1Connect
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\user\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
	
	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\user\UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	500	T_BTUserAPI	\bluetooth\user\BT-USER-AccessRequirements-PublicApi-Active-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-AccessRequirements-PublicApi-Active-0001-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~		
			COMMAND		CBluetoothSocket1	RSocketServerClose	
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\user\UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-AccessRequirements-PublicApi-Active-Master-0001


// ****************************************************************************
// TBTAccessRequirement - Master (Manual Tests)
// ****************************************************************************	
// Connected

START_TESTCASE BT-USER-Access-PublicApi-Active-Master-0001
//! @SYMTestCaseID				BT-USER-Access-PublicApi-Active-Master-0001
//! @SYMAPI						CBluetoothSocket, TBTDevAddr, RHostResolver, TRfcommSockAddr, TBTAccessRequirements, TBTServiceSecurity
//! @SYMTestCaseDesc			Open a connection to a specific Bluetooth device
//!								Set SetEncryption() to FALSE
//!								Set SetDenied() to FALSE
//!								Set SetPasskeyMinLength() to 4
//!								Set SetAuthentication() to FALSE
//!								Set SetAuthorisation() to FALS
//!								Passkey is asked first in slave and then in master while connecting. The min passkey lengthis specified as 4 in the passkey entrance window. The test case passes without any error.
//!								Uses API elements: 	NewL()1, Connect()1 and Shutdown() from CBluetoothSocket
//!													TBTDevAddr() from TBTDevAddr
//!													Open(), SetHostName(), GetDeviceAddress() from RHostResolver
//!													TRfcommSockAddr(), SetSecurity(), SetBTAddr(), BTAddr(), SetPort() from TRfcommSockAddr
//!													SetEncryption(), SetDenied(), SetPasskeyMinLength(), SetAuthentication() and SetAuthorisation() from TBTAccessRequirements
//! @SYMTestActions				1. Order slave to set up connection
//!								2. Get result from slave to wait for it to be ready
//!								3. Create a connection to the RSocket server
//!								4. Create the CBluetoothSocket object using NewL()1 (Standard constructor)
//!								5. Create an empty TBTServiceSecurity object
//!								6. Set the encryption requirement using SetEncryption() function (FALSE)
//!								7. Set the denied requirement using SetDenied() function (FALSE)
//!								8. Set the minimal length requrement for passkey using SetPasskeyMinLength() function (4)
//!								9. Set the authentication requirement using SetAuthentication() function (FALSE)
//!								10. Set the authorisation requirement using SetAuthorisation() function (FALSE)
//!								11. Create an empty TBTDevAddr object (slave)
//!								12. Create and initialise an RHostResolver
//!								13. Set Hostname (MasterDevice) of the device
//!								14. Get the slave device address
//!								15. Create a TRfcommSockAddr object
//!								16. Set the Security of the TRfcommSockAddr (Use default/empty as on server)
//!								17. Set the BT address of the TRfcommSockAddr to the one of the Casira pod of the slave that we connect to
//!								18. Verify the set BT Address
//!								19. Set the port to the specific one of the protocol we use
//!								20. Use the TRfcommSockAddr in the connect of the CBluetoothSocket object
//!								21. Shut down the CBluetoothSocket object
//!								22. delete CBluetoothSocket object
//!
//! @SYMTestStatus				Implemented
//! @SYMTestPriority			Critical
//! @SYMTestExpectedResults		Pre-condition : no authenticated devices in both emulators.
//!								Passkey is asked first in slave and then in master while connecting. The min passkey lengthis specified as 4 in the passkey entrance window.
//!								In the master emulator, slave is seen as authenticated. In the slave emulator, master is seen as authenticated.
//!								The test case passes without any error.
//! @SYMTestType				CIT

	START_TEST_BLOCK	500	T_BTUserAPI	\bluetooth\user\BT-USER-AccessRequirements-PublicApi-Active-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
			COMMAND		CBluetoothSocket1	RSocketServerConnect		
			COMMAND		CBluetoothSocket1	NewL		BT-USER-Access-PublicApi-Active-0001-0001command2NewL
			COMMAND		TBTServiceSecurity1	Construct		
			COMMAND		TBTServiceSecurity1	SetEncryption		BT-USER-Access-PublicApi-Active-0001-0001command5SetEncryption
			COMMAND		TBTServiceSecurity1	SetDenied			BT-USER-Access-PublicApi-Active-0001-0001command6SetDenied
			COMMAND		TBTServiceSecurity1	SetPasskeyMinLength		BT-USER-Access-PublicApi-Active-0001-0001command7SetPasskeyMinLength
			COMMAND		TBTServiceSecurity1	SetAuthentication		BT-USER-Access-PublicApi-Active-0001-0001command8SetAuthentication
			COMMAND		TBTServiceSecurity1	SetAuthorisation		BT-USER-Access-PublicApi-Active-0001-0001command9SetAuthorisation
			STORE	CBluetoothSocket1	
			STORE	TBTServiceSecurity1	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	DELAY	2000
	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\user\UccControlChannelConfig.ini StartSyncTestCase
	DELAY	5000
	START_TEST_BLOCK	500	T_BTUserAPI	\bluetooth\user\BT-USER-AccessRequirements-PublicApi-Active-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
			COMMAND		TBTDevAddrRemote	Construct		
			COMMAND		TBTDevAddrRemote	OpenHostResolver		BT-USER-Access-PublicApi-Active-0001-0002command3OpenHostResolver
			COMMAND		TBTDevAddrRemote	SetHostNameL		BT-USER-Access-PublicApi-Active-0001-0002command4SetHostNameL
			COMMAND		TBTDevAddrRemote	GetDeviceAddress		BT-USER-Access-PublicApi-Active-0001-0002command5GetDeviceAddress
			OUTSTANDING
			COMMAND		TRfcommSockAddr1	Construct		
			COMMAND		TRfcommSockAddr1	SetSecurity		BT-USER-Access-PublicApi-Active-0001-0002command8SetSecurity
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-Access-PublicApi-Active-0001-0002command9SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-Access-PublicApi-Active-0001-0002command10BTAddr
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-Access-PublicApi-Active-0001-0002command11SetPort
			STORE	CBluetoothSocket1	
			STORE	TRfcommSockAddr1	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\user\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
	DELAY	2000

	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\user\UccControlChannelConfig.ini StartSyncTestCase
	DELAY	5000
	START_TEST_BLOCK	2000	T_BTUserAPI	\bluetooth\user\BT-USER-AccessRequirements-PublicApi-Active-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			COMMAND		CBluetoothSocket1	Connect		BT-USER-Access-PublicApi-Active-0001-0003command1Connect
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\user\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
	
	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\user\UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	500	T_BTUserAPI	\bluetooth\user\BT-USER-AccessRequirements-PublicApi-Active-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-Access-PublicApi-Active-0001-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~		
			COMMAND		CBluetoothSocket1	RSocketServerClose		
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\user\UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-Access-PublicApi-Active-Master-0001


START_TESTCASE BT-USER-Access-PublicApi-Active-Master-0002
//! @SYMTestCaseID				BT-USER-Access-PublicApi-Active-Master-0002
//! @SYMAPI						CBluetoothSocket, TBTDevAddr, RHostResolver, TRfcommSockAddr, TBTAccessRequirements, TBTServiceSecurity
//! @SYMTestCaseDesc			Open a connection to a specific Bluetooth device
//!								Set SetEncryption() to FALSE
//!								Set SetDenied() to FALSE
//!								Set SetPasskeyMinLength() to 4
//!								Set SetAuthentication() to TRUE
//!								Set SetAuthorisation() to FALS
//!								Passkey is asked first in master and then in slave while connecting. The min passkey lengthis specified as 4 in the passkey entrance window. The test case passes without any error.
//!								Uses API elements: 	NewL()1, Connect()1 and Shutdown() from CBluetoothSocket
//!													TBTDevAddr() from TBTDevAddr
//!													Open(), SetHostName(), GetDeviceAddress() from RHostResolver
//!													TRfcommSockAddr(), SetSecurity(), SetBTAddr(), BTAddr(), SetPort() from TRfcommSockAddr
//!													SetEncryption(), SetDenied(), SetPasskeyMinLength(), SetAuthentication() and SetAuthorisation() from TBTAccessRequirements
//! @SYMTestActions				1. Order slave to set up connection
//!								2. Get result from slave to wait for it to be ready
//!								3. Create a connection to the RSocket server
//!								4. Create the CBluetoothSocket object using NewL()1 (Standard constructor)
//!								5. Create an empty TBTServiceSecurity object
//!								6. Set the encryption requirement using SetEncryption() function (FALSE)
//!								7. Set the denied requirement using SetDenied() function (FALSE)
//!								8. Set the minimal length requrement for passkey using SetPasskeyMinLength() function (4)
//!								9. Set the authentication requirement using SetAuthentication() function (TRUE)
//!								10. Set the authorisation requirement using SetAuthorisation() function (FALSE)
//!								11. Create an empty TBTDevAddr object (slave)
//!								12. Create and initialise an RHostResolver
//!								13. Set Hostname (MasterDevice) of the device
//!								14. Get the slave device address
//!								15. Create a TRfcommSockAddr object
//!								16. Set the Security of the TRfcommSockAddr (Use default/empty as on server)
//!								17. Set the BT address of the TRfcommSockAddr to the one of the Casira pod of the slave that we connect to
//!								18. Verify the set BT Address
//!								19. Set the port to the specific one of the protocol we use
//!								20. Use the TRfcommSockAddr in the connect of the CBluetoothSocket object
//!								21. Shut down the CBluetoothSocket object
//!								22. delete CBluetoothSocket object
//!
//! @SYMTestStatus				Implemented
//! @SYMTestPriority			Critical
//! @SYMTestExpectedResults		Because authentication has already been done in the previous test case, 
//!								the Passkey will not be asked again in master and then in slave while connecting.
//!								In the master emulator, slave is seen as authenticated. In the slave emulator, master is seen as authenticated.
//!								The test case passes without any error.
//! @SYMTestType				CIT

	START_TEST_BLOCK	500	T_BTUserAPI	\bluetooth\user\BT-USER-AccessRequirements-PublicApi-Active-Master.ini
			SHARED_ACTIVE_SCHEDULER
			CREATE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
			COMMAND		CBluetoothSocket1	RSocketServerConnect		
			COMMAND		CBluetoothSocket1	NewL		BT-USER-Access-PublicApi-Active-0002-0001command2NewL
			COMMAND		TBTServiceSecurity1	Construct		
			COMMAND		TBTServiceSecurity1	SetEncryption		BT-USER-Access-PublicApi-Active-0002-0001command5SetEncryption
			COMMAND		TBTServiceSecurity1	SetDenied			BT-USER-Access-PublicApi-Active-0002-0001command6SetDenied
			COMMAND		TBTServiceSecurity1	SetPasskeyMinLength		BT-USER-Access-PublicApi-Active-0002-0001command7SetPasskeyMinLength
			COMMAND		TBTServiceSecurity1	SetAuthentication		BT-USER-Access-PublicApi-Active-0002-0001command8SetAuthentication
			COMMAND		TBTServiceSecurity1	SetAuthorisation		BT-USER-Access-PublicApi-Active-0002-0001command9SetAuthorisation
			STORE	CBluetoothSocket1	
			STORE	TBTServiceSecurity1	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	DELAY	2000
	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\user\UccControlChannelConfig.ini StartSyncTestCase
	DELAY	5000
	START_TEST_BLOCK	500	T_BTUserAPI	\bluetooth\user\BT-USER-AccessRequirements-PublicApi-Active-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			CREATE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			CREATE_OBJECT	TBTDevAddr	TBTDevAddrRemote	
			RESTORE_OBJECT	TBTServiceSecurity	TBTServiceSecurity1	
			COMMAND		TBTDevAddrRemote	Construct		
			COMMAND		TBTDevAddrRemote	OpenHostResolver		BT-USER-Access-PublicApi-Active-0002-0002command3OpenHostResolver
			COMMAND		TBTDevAddrRemote	SetHostNameL		BT-USER-Access-PublicApi-Active-0002-0002command4SetHostNameL
			COMMAND		TBTDevAddrRemote	GetDeviceAddress		BT-USER-Access-PublicApi-Active-0002-0002command5GetDeviceAddress
			OUTSTANDING
			COMMAND		TRfcommSockAddr1	Construct		
			COMMAND		TRfcommSockAddr1	SetSecurity		BT-USER-Access-PublicApi-Active-0002-0002command8SetSecurity
			COMMAND		TRfcommSockAddr1	SetBTAddr		BT-USER-Access-PublicApi-Active-0002-0002command9SetBTAddr
			COMMAND		TRfcommSockAddr1	BTAddr		BT-USER-Access-PublicApi-Active-0002-0002command10BTAddr
			COMMAND		TRfcommSockAddr1	SetPort		BT-USER-Access-PublicApi-Active-0002-0002command11SetPort
			STORE	CBluetoothSocket1	
			STORE	TRfcommSockAddr1	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\user\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
	DELAY	2000
	
	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\user\UccControlChannelConfig.ini StartSyncTestCase
	DELAY	5000
	START_TEST_BLOCK	2000	T_BTUserAPI	\bluetooth\user\BT-USER-AccessRequirements-PublicApi-Active-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			RESTORE_OBJECT	TRfcommSockAddr	TRfcommSockAddr1	
			COMMAND		CBluetoothSocket1	Connect		BT-USER-Access-PublicApi-Active-0002-0003command1Connect
			OUTSTANDING
			STORE	CBluetoothSocket1	
			STORE_ACTIVE_SCHEDULER
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\user\UccControlChannelConfig.ini RetrieveSyncTestCaseResult
	
	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\user\UccControlChannelConfig.ini StartSyncTestCase
	START_TEST_BLOCK	500	T_BTUserAPI	\bluetooth\user\BT-USER-AccessRequirements-PublicApi-Active-Master.ini
			SHARED_ACTIVE_SCHEDULER
			RESTORE_OBJECT	CBluetoothSocket	CBluetoothSocket1	
			COMMAND		CBluetoothSocket1	Shutdown		BT-USER-Access-PublicApi-Active-0002-0004command1Shutdown
			OUTSTANDING
			COMMAND		CBluetoothSocket1	~		
			COMMAND		CBluetoothSocket1	RSocketServerClose		
	END_TEST_BLOCK
	RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\user\UccControlChannelConfig.ini RetrieveSyncTestCaseResult

END_TESTCASE BT-USER-Access-PublicApi-Active-Master-0002


RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\user\UccControlChannelConfig.ini RetrieveExecutionResultAccessPassiveSlave
RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\user\UccControlChannelConfig.ini StopTDService
RUN_TEST_STEP -1 UCCControlTE RunCommand \bluetooth\user\UccControlChannelConfig.ini StopSyncService