bluetoothapitest/bluetoothsvs/T_BTUserAPI/scripts/bt-user-seid-publishedpartner.script
//
// 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 published partner elements of the TSEID class
//! as a means of confidence that the API works as expected.
//! The purpose is to provide a regression test suite of PublishedPartner 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 Wekey Weng
//! @SYMCreationDate 10/03/2008
///////////////////////////////////////////////////////////////////////////////
RUN_UTILS MkDir ${SYSDRIVE}\bluetooth\user\
LOAD_SUITE T_BTUserAPI
DELAY 500
// ****************************************************************************
// TSEID
// ****************************************************************************
START_TESTCASE BT-USER-SEID-PublishedPartner-0001
//! @SYMTestCaseID BT-USER-SEID-PublishedPartner-0001
//! @SYMAPI TSEID::TSEID()
//! @SYMAuthor Wekey Weng
//! @SYMCreationDate 02/29/2008
//! @SYMTestCaseDesc Default constructor using KInvalidSEID as the stream endpoint identifier (SEID) value
//! @SYMTestActions 1. Create a TSEID object using default constructor
//! 2. Destruct.
//! @SYMTestStatus Implemented
//! @SYMTestPriority Low
//! @SYMTestExpectedResults TSEID object is created successfully
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-SEID-PublishedPartner.ini
CREATE_OBJECT TSEID seid
COMMAND seid new
COMMAND seid ~
END_TEST_BLOCK
END_TESTCASE BT-USER-SEID-PublishedPartner-0001
START_TESTCASE BT-USER-SEID-PublishedPartner-0002
//! @SYMTestCaseID BT-USER-SEID-PublishedPartner-0002
//! @SYMAPI TSEID::TSEID(TUint, TBool)
//! @SYMAuthor Wekey Weng
//! @SYMCreationDate 02/29/2008
//! @SYMTestCaseDesc Construct a TSEID with stream endpoint identifier (SEID), and a local or remote endpoint values.
//! @SYMTestActions 1. Create a TSEID object referring to a local endpoint with 0
//! 2. Destruct the TSEID object.
//! 3. Create a TSEID object referring to a remote endpoint with 0
//! 4. Destruct the TSEID object.
//! 5. Create a TSEID object referring to a local endpoint with 4294967295
//! 6. Destruct the TSEID object.
//! 7. Create a TSEID object referring to a remote endpoint with 4294967295
//! 8. Destruct the TSEID object.
//! @SYMTestStatus Implemented
//! @SYMTestPriority Low
//! @SYMTestExpectedResults 1. TSEID objects are created successfully
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-SEID-PublishedPartner.ini
CREATE_OBJECT TSEID seid
COMMAND seid new BT-USER-SEID-PublishedPartner-0002-0001-new_Command1
COMMAND seid ~
CREATE_OBJECT TSEID seid2
COMMAND seid new BT-USER-SEID-PublishedPartner-0002-0001-new_Command3
COMMAND seid ~
CREATE_OBJECT TSEID seid3
COMMAND seid2 new BT-USER-SEID-PublishedPartner-0002-0001-new_Command5
COMMAND seid2 ~
CREATE_OBJECT TSEID seid4
COMMAND seid2 new BT-USER-SEID-PublishedPartner-0002-0001-new_Command7
COMMAND seid2 ~
END_TEST_BLOCK
END_TESTCASE BT-USER-SEID-PublishedPartner-0002
START_TESTCASE BT-USER-SEID-PublishedPartner-0003
//! @SYMTestCaseID BT-USER-SEID-PublishedPartner-0003
//! @SYMAPI TSEID::SEID()
//! @SYMAuthor Wekey Weng
//! @SYMCreationDate 02/29/2008
//! @SYMTestCaseDesc Get the stream endpoint identifier (SEID) value
//! @SYMTestActions 1. Create a TSEID object using default constructor
//! 2. Create 2 TSEID objects with same SEID
//! 2.1 Create a TSEID object for local with SEID(10)
//! 2.2 Create a TSEID object for remote with SEID(10)
//! 3. Get the SEIDs of all TSEID objects
//! 3.1 Get the SEID of object created by default constructor
//! 3.2 Get the SEID of object referring to a local endpoint
//! 3.3 Get the SEID of object referring to a remote endpoint
//! 4. Destruct the 3 TSEID objects.
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults 1. Get SEIDs as expected and no panic caused
//! 1.1 Step 3.1 returns KInvalidSEID
//! 1.2 Step 3.2 returns 10
//! 1.3 Step 3.3 returns 10
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-SEID-PublishedPartner.ini
CREATE_OBJECT TSEID seid
COMMAND seid new
CREATE_OBJECT TSEID seid2
COMMAND seid2 new BT-USER-SEID-PublishedPartner-0003-0001-new_Command2
CREATE_OBJECT TSEID seid3
COMMAND seid3 new BT-USER-SEID-PublishedPartner-0003-0001-new_Command3
COMMAND seid SEID BT-USER-SEID-PublishedPartner-0003-0001-SEID_Command4
COMMAND seid2 SEID BT-USER-SEID-PublishedPartner-0003-0001-SEID_Command5
COMMAND seid3 SEID BT-USER-SEID-PublishedPartner-0003-0001-SEID_Command6
COMMAND seid ~
COMMAND seid2 ~
COMMAND seid3 ~
END_TEST_BLOCK
END_TESTCASE BT-USER-SEID-PublishedPartner-0003
START_TESTCASE BT-USER-SEID-PublishedPartner-0004
//! @SYMTestCaseID BT-USER-SEID-PublishedPartner-0004
//! @SYMAPI TSEID::IsValid()
//! @SYMAuthor Wekey Weng
//! @SYMCreationDate 02/29/2008
//! @SYMTestCaseDesc Checks whether the SEID is allowed by the AVDTP Specification(1~63)
//! @SYMTestActions 1. Create a TSEID object using default constructor
//! 2. Create 3 TSEID objects
//! 2.1 Create a TSEID object with value(0)
//! 2.2 Create a TSEID object with value(63)
//! 2.3 Create a TSEID object with value(64)
//! 3. Check whether the SEID is allowed
//! 3.1 Check the TSEID object created by default constructor
//! 3.2 Check the TSEID with value(0)
//! 3.3 Check the TSEID with value(63)
//! 3.4 Check the TSEID with value(64)
//! 4. Destruct the 3 TSEID objects.
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults 1. No panic caused and return expected value
//! 1.1 Step 3.1 returns EFalse
//! 1.1 Step 3.2 returns EFalse
//! 1.2 Step 3.3 returns ETrue
//! 1.3 Step 3.4 returns EFalse
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-SEID-PublishedPartner.ini
CREATE_OBJECT TSEID seid
COMMAND seid new
CREATE_OBJECT TSEID seid2
COMMAND seid2 new BT-USER-SEID-PublishedPartner-0004-0001-new_Command2
CREATE_OBJECT TSEID seid3
COMMAND seid3 new BT-USER-SEID-PublishedPartner-0004-0001-new_Command3
CREATE_OBJECT TSEID seid4
COMMAND seid4 new BT-USER-SEID-PublishedPartner-0004-0001-new_Command4
COMMAND seid IsValid BT-USER-SEID-PublishedPartner-0004-0001-IsValid_Command5
COMMAND seid2 IsValid BT-USER-SEID-PublishedPartner-0004-0001-IsValid_Command6
COMMAND seid3 IsValid BT-USER-SEID-PublishedPartner-0004-0001-IsValid_Command7
COMMAND seid4 IsValid BT-USER-SEID-PublishedPartner-0004-0001-IsValid_Command8
COMMAND seid ~
COMMAND seid2 ~
COMMAND seid3 ~
COMMAND seid4 ~
END_TEST_BLOCK
END_TESTCASE BT-USER-SEID-PublishedPartner-0004
START_TESTCASE BT-USER-SEID-PublishedPartner-0005
//! @SYMTestCaseID BT-USER-SEID-PublishedPartner-0005
//! @SYMAPI TSEID::operator==(TSEID)
//! @SYMAuthor Wekey Weng
//! @SYMCreationDate 02/29/2008
//! @SYMTestCaseDesc Comparison operator between 2 TSED objects created by different conditions
//! @SYMTestActions 1. Create 2 TSEID objects using default constructor
//! 2. Create 4 TSEID objects
//! 2.1 Create 2 TSEID objects for local with SEID(10)
//! 2.2 Create a TSEID object for remote with SEID(10)
//! 2.3 Create a TSEID object for local with SEID(20)
//! 3. Compare TSEID objects
//! 3.1 Compare 2 objects created by default constructor
//! 3.2 Compare 1 object created by default constructor to another object(remote) with SEID(10)
//! 3.3 Compare 2 objects both referring to local but different SEID(10 and 20)
//! 3.4 Compare 1 object(local) to another object(remote) with same SEID(10)
//! 3.5 Compare 2 objects both referring to local with same SEID(10)
//! 4. Destruct the 6 TSEID objects.
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults 1. Compare 2 objects returns expected value and no panic caused
//! 1.1 Step 3.1 returns ETrue
//! 1.2 Step 3.2 returns EFalse
//! 1.3 Step 3.3 returns EFalse
//! 1.4 Step 3.4 returns EFalse
//! 1.5 Step 3.5 returns ETrue
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-SEID-PublishedPartner.ini
CREATE_OBJECT TSEID seid
COMMAND seid new
CREATE_OBJECT TSEID seid2
COMMAND seid2 new
CREATE_OBJECT TSEID seid3
COMMAND seid3 new BT-USER-SEID-PublishedPartner-0005-0001-new_Command3
CREATE_OBJECT TSEID seid4
COMMAND seid4 new BT-USER-SEID-PublishedPartner-0005-0001-new_Command4
CREATE_OBJECT TSEID seid5
COMMAND seid5 new BT-USER-SEID-PublishedPartner-0005-0001-new_Command5
CREATE_OBJECT TSEID seid6
COMMAND seid6 new BT-USER-SEID-PublishedPartner-0005-0001-new_Command6
COMMAND seid == BT-USER-SEID-PublishedPartner-0005-0001-==_Command7
COMMAND seid == BT-USER-SEID-PublishedPartner-0005-0001-==_Command8
COMMAND seid3 == BT-USER-SEID-PublishedPartner-0005-0001-==_Command9
COMMAND seid4 == BT-USER-SEID-PublishedPartner-0005-0001-==_Command10
COMMAND seid3 == BT-USER-SEID-PublishedPartner-0005-0001-==_Command11
COMMAND seid ~
COMMAND seid2 ~
COMMAND seid3 ~
COMMAND seid4 ~
COMMAND seid5 ~
COMMAND seid6 ~
END_TEST_BLOCK
END_TESTCASE BT-USER-SEID-PublishedPartner-0005
START_TESTCASE BT-USER-SEID-PublishedPartner-0006
//! @SYMTestCaseID BT-USER-SEID-PublishedPartner-0006
//! @SYMAPI TSEID::operator!=(TSEID)
//! @SYMAuthor Wekey Weng
//! @SYMCreationDate 02/29/2008
//! @SYMTestCaseDesc Negative comparison operator between 2 TSED objects created by different conditions
//! @SYMTestActions 1. Create 2 TSEID objects using default constructor
//! 2. Create 4 TSEID objects
//! 2.1 Create 2 TSEID objects for local with SEID(10)
//! 2.2 Create a TSEID object for remote with SEID(10)
//! 2.3 Create a TSEID object for local with SEID(20)
//! 3. Negative comparison between 2 TSEID object
//! 3.1 Negative comparison between 2 objects created by default constructor
//! 3.2 Negative comparison between 1 object created by default constructor and another object(remote) with SEID(10)
//! 3.3 Negative comparison between 2 objects both referring to local but different SEID(10 and 20)
//! 3.4 Negative comparison between 1 object(local) and another object(remote) with same SEID(10)
//! 3.5 Negative comparison between 2 objects both referring to local with same SEID(10)
//! 4. Destruct the 6 TSEID objects.
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults 1. Negative comparison between 2 objects returns expected value and no panic caused
//! 1.1 Step 3.1 returns EFalse
//! 1.2 Step 3.2 returns ETrue
//! 1.3 Step 3.3 returns ETrue
//! 1.4 Step 3.4 returns ETrue
//! 1.5 Step 3.5 returns EFalse
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-SEID-PublishedPartner.ini
CREATE_OBJECT TSEID seid
COMMAND seid new
CREATE_OBJECT TSEID seid2
COMMAND seid2 new
CREATE_OBJECT TSEID seid3
COMMAND seid3 new BT-USER-SEID-PublishedPartner-0006-0001-new_Command3
CREATE_OBJECT TSEID seid4
COMMAND seid4 new BT-USER-SEID-PublishedPartner-0006-0001-new_Command4
CREATE_OBJECT TSEID seid5
COMMAND seid5 new BT-USER-SEID-PublishedPartner-0006-0001-new_Command5
CREATE_OBJECT TSEID seid6
COMMAND seid6 new BT-USER-SEID-PublishedPartner-0006-0001-new_Command6
COMMAND seid != BT-USER-SEID-PublishedPartner-0006-0001-!=_Command7
COMMAND seid != BT-USER-SEID-PublishedPartner-0006-0001-!=_Command8
COMMAND seid3 != BT-USER-SEID-PublishedPartner-0006-0001-!=_Command9
COMMAND seid4 != BT-USER-SEID-PublishedPartner-0006-0001-!=_Command10
COMMAND seid3 != BT-USER-SEID-PublishedPartner-0006-0001-!=_Command11
COMMAND seid ~
COMMAND seid2 ~
COMMAND seid3 ~
COMMAND seid4 ~
COMMAND seid5 ~
COMMAND seid6 ~
END_TEST_BLOCK
END_TESTCASE BT-USER-SEID-PublishedPartner-0006
START_TESTCASE BT-USER-SEID-PublishedPartner-0007
//! @SYMTestCaseID BT-USER-SEID-PublishedPartner-0007
//! @SYMAPI TSEID::Reset()
//! @SYMAuthor Wekey Weng
//! @SYMCreationDate 02/29/2008
//! @SYMTestCaseDesc Reset any internal state and values
//! @SYMTestActions 1. Create 1 TSEID object using default constructor
//! 2. Create 1 TSEID object referring to a local endpoint with SEID(10);
//! 3. Compare these 2 objects
//! 4. Reset the later object
//! 5. Compare these 2 objects again
//! 6. Destruct the 2 TSEID objects.
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults 1. Step 3 returns EFalse
//! 2. Step 4 reset TSEID object without causing panic
//! 3. Step 5 returns ETrue
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-SEID-PublishedPartner.ini
CREATE_OBJECT TSEID seid
COMMAND seid new
CREATE_OBJECT TSEID seid2
COMMAND seid2 new BT-USER-SEID-PublishedPartner-0007-0001-new_Command2
COMMAND seid == BT-USER-SEID-PublishedPartner-0007-0001-==_Command3
COMMAND seid2 Reset
COMMAND seid == BT-USER-SEID-PublishedPartner-0007-0001-==_Command5
COMMAND seid ~
COMMAND seid2 ~
END_TEST_BLOCK
END_TESTCASE BT-USER-SEID-PublishedPartner-0007
START_TESTCASE BT-USER-SEID-PublishedPartner-0008
//! @SYMTestCaseID BT-USER-SEID-PublishedPartner-0008
//! @SYMAPI TSEID::IsLocal()
//! @SYMAuthor Wekey Weng
//! @SYMCreationDate 02/29/2008
//! @SYMTestCaseDesc Test whether the SEID refers to a local endpoint
//! @SYMTestActions 1. Create 1 TSEID object referring to a local endpoint and 1 TSEID object referring to a remote endpoint with same SEID(10);
//! 2. Test whether the TSEID object refers to a local endpoint
//! 2.1 Test the TSEID created for local
//! 2.2 Test the TSEID created for remote
//! 3. Destruct the 2 TSEID objects.
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults 1. Return expected value without causing panic
//! 1.1. Step 2.1 returns ETrue
//! 1.2. Step 2.2 returns EFalse
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-SEID-PublishedPartner.ini
CREATE_OBJECT TSEID seid
COMMAND seid new BT-USER-SEID-PublishedPartner-0008-0001-new_Command1
CREATE_OBJECT TSEID seid2
COMMAND seid2 new BT-USER-SEID-PublishedPartner-0008-0001-new_Command2
COMMAND seid IsLocal BT-USER-SEID-PublishedPartner-0008-0001-IsLocal_Command3
COMMAND seid2 IsLocal BT-USER-SEID-PublishedPartner-0008-0001-IsLocal_Command4
COMMAND seid ~
COMMAND seid2 ~
END_TEST_BLOCK
END_TESTCASE BT-USER-SEID-PublishedPartner-0008
START_TESTCASE BT-USER-SEID-PublishedPartner-0012
//! @SYMTestCaseID BT-USER-SEID-PublishedPartner-0012
//! @SYMAPI TSEID::TSEID(TUint, TBool)
//! @SYMAuthor Jason Lin
//! @SYMCreationDate 03/25/2008
//! @SYMTestCaseDesc Constructor taking a stream endpoint identifier (SEID) value, and whether it refers to a local or remote endpoint
//! @SYMTestActions 1. Create a TSEID object referring to a local endpoint with 0
//! 2. Check the TSEID object refers to a local endpoint
//! 3. Destruct the TSEID object.
//! @SYMTestStatus Implemented
//! @SYMTestPriority Low
//! @SYMTestExpectedResults 1. TSEID objects are created successfully, and the methods are called without any panic
//! 2.1 Step 2 return ETrue
//! 2.2 Destruct TSEID object successfully
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-SEID-PublishedPartner.ini
CREATE_OBJECT TSEID seid
COMMAND seid new BT-USER-SEID-PublishedPartner-0012-0001-new_Command1
COMMAND seid IsLocal BT-USER-SEID-PublishedPartner-0012-0001-IsLocal_Command2
COMMAND seid ~
END_TEST_BLOCK
END_TESTCASE BT-USER-SEID-PublishedPartner-0012
START_TESTCASE BT-USER-SEID-PublishedPartner-0013
//! @SYMTestCaseID BT-USER-SEID-PublishedPartner-0013
//! @SYMAPI TSEID::TSEID(TUint, TBool)
//! @SYMAuthor Jason Lin
//! @SYMCreationDate 03/25/2008
//! @SYMTestCaseDesc Constructor taking a stream endpoint identifier (SEID) value, and whether it refers to a local or remote endpoint
//! @SYMTestActions 1. Create a TSEID object referring to a remote endpoint with 0
//! 2. Check the TSEID object refers to a remote endpoint
//! 3. Destruct the TSEID object.
//! @SYMTestStatus Implemented
//! @SYMTestPriority Low
//! @SYMTestExpectedResults 1. TSEID objects are created successfully, and the methods are called without any panic
//! 2.1 Step 2 return EFalse
//! 2.2 Destruct TSEID object successfully
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-SEID-PublishedPartner.ini
CREATE_OBJECT TSEID seid
COMMAND seid new BT-USER-SEID-PublishedPartner-0013-0001-new_Command1
COMMAND seid IsLocal BT-USER-SEID-PublishedPartner-0013-0001-IsLocal_Command2
COMMAND seid ~
END_TEST_BLOCK
END_TESTCASE BT-USER-SEID-PublishedPartner-0013
START_TESTCASE BT-USER-SEID-PublishedPartner-0014
//! @SYMTestCaseID BT-USER-SEID-PublishedPartner-0014
//! @SYMAPI TSEID::TSEID(TUint, TBool)
//! @SYMAuthor Jason Lin
//! @SYMCreationDate 03/25/2008
//! @SYMTestCaseDesc Constructor taking a stream endpoint identifier (SEID) value, and whether it refers to a local or remote endpoint
//! @SYMTestActions 1. Create a TSEID object referring to a local endpoint with 268435456(0x10000000)
//! 2. Check the TSEID object refers to a local endpoint
//! 3. Destruct the TSEID object.
//! @SYMTestStatus Implemented
//! @SYMTestPriority Low
//! @SYMTestExpectedResults 1. TSEID objects are created successfully, and the methods are called without any panic
//! 2.1 Step 2 return ETrue
//! 2.2 Destruct TSEID object successfully
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-SEID-PublishedPartner.ini
CREATE_OBJECT TSEID seid
COMMAND seid new BT-USER-SEID-PublishedPartner-0014-0001-new_Command1
COMMAND seid IsLocal BT-USER-SEID-PublishedPartner-0014-0001-IsLocal_Command2
COMMAND seid ~
END_TEST_BLOCK
END_TESTCASE BT-USER-SEID-PublishedPartner-0014
START_TESTCASE BT-USER-SEID-PublishedPartner-0015
//! @SYMTestCaseID BT-USER-SEID-PublishedPartner-0015
//! @SYMAPI TSEID::TSEID(TUint, TBool)
//! @SYMAuthor Jason Lin
//! @SYMCreationDate 03/25/2008
//! @SYMTestCaseDesc Constructor taking a stream endpoint identifier (SEID) value, and whether it refers to a local or remote endpoint
//! @SYMTestActions 1. Create a TSEID object referring to a remote endpoint with 268435456(0x10000000)
//! 2. Check the TSEID object refers to a remote endpoint
//! 3. Destruct the TSEID object.
//! @SYMTestStatus Implemented
//! @SYMTestPriority Low
//! @SYMTestExpectedResults 1. TSEID objects are created successfully, and the methods are called without any panic
//! 2.1 Step 2 return EFalse
//! 2.2 Destruct TSEID object successfully
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-SEID-PublishedPartner.ini
CREATE_OBJECT TSEID seid
COMMAND seid new BT-USER-SEID-PublishedPartner-0015-0001-new_Command1
COMMAND seid IsLocal BT-USER-SEID-PublishedPartner-0015-0001-IsLocal_Command2
COMMAND seid ~
END_TEST_BLOCK
END_TESTCASE BT-USER-SEID-PublishedPartner-0015
DELAY 2000