bluetoothapitest/bluetoothsvs/T_BTUserAPI/scripts/BT-USER-L2CapSockAddr-PublicApi.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 public elements of the TL2CAPSockAddr 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 Ting Yen
//! @SYMCreationDate 20/03/2007
///////////////////////////////////////////////////////////////////////////////
RUN_UTILS MkDir ${SYSDRIVE}\bluetooth\
RUN_UTILS MkDir ${SYSDRIVE}\bluetooth\user\
LOAD_SUITE T_BTUserAPI
DELAY 500
// ****************************************************************************
// TL2CAPSockAddr
// ****************************************************************************
START_TESTCASE BT-USER-L2CapSockAddr-PublicApi-4001
//! @SYMTestCaseID BT-USER-L2CapSockAddr-PublicApi-4001
//! @SYMAPI TL2CAPSockAddr
//! @SYMTestCaseDesc Create a TL2CAPSockAddr object
//! Uses API elements: TL2CAPSockAddr()
//! @SYMTestActions Create a new empty TL2CAPSockAddr object
//!
//! @SYMTestStatus Implemented
//! @SYMTestPriority Low
//! @SYMTestExpectedResults object created
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-L2CapSockAddr-PublicApi.ini
CREATE_OBJECT TL2CAPSockAddr TL2CAPSockAddrData
COMMAND TL2CAPSockAddrData TL2CAPSockAddr
END_TEST_BLOCK
END_TESTCASE BT-USER-L2CapSockAddr-PublicApi-4001
START_TESTCASE BT-USER-L2CapSockAddr-PublicApi-4002
//! @SYMTestCaseID BT-USER-L2CapSockAddr-PublicApi-4002
//! @SYMAPI TL2CAPSockAddr and TSockAddr
//! @SYMTestCaseDesc Create a TL2CAPSockAddr object
//! Uses API elements: TL2CAPSockAddr::TL2CAPSockAddr() and TSockAddr::TSockAddr()
//! @SYMTestActions 1. Create a new empty TSockAddr object
//! 2. Create a new empty TL2CAPSockAddr object from a TSockAddr object
//!
//! @SYMTestStatus Implemented
//! @SYMTestPriority Low
//! @SYMTestExpectedResults object created
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-L2CapSockAddr-PublicApi.ini
CREATE_OBJECT TSockAddr TSockAddrData
CREATE_OBJECT TL2CAPSockAddr TL2CAPSockAddrData
COMMAND TSockAddrData Construct
COMMAND TL2CAPSockAddrData TL2CAPSockAddr BT-USER-L2CapSockAddr-PublicApi-0002-0001command4TL2CAPSockAddr
END_TEST_BLOCK
END_TESTCASE BT-USER-L2CapSockAddr-PublicApi-4002
START_TESTCASE BT-USER-L2CapSockAddr-PublicApi-4003
//! @SYMTestCaseID BT-USER-L2CapSockAddr-PublicApi-4003
//! @SYMAPI TL2CAPSockAddr and TSockAddr
//! @SYMTestCaseDesc Utility function to downcast a TSockAddr to a TL2CAPSockAddr
//! Uses API elements: TSockAddr::TSockAddr() and TL2CAPSockAddr::Cast()
//! @SYMTestActions 1. Create a new empty TSockAddr object
//! 2. Cast the TSockAddr object to a TL2CAPSockAddr object
//!
//! @SYMTestStatus Implemented
//! @SYMTestPriority Low
//! @SYMTestExpectedResults TL2CAPSockAddr object created by cast
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-L2CapSockAddr-PublicApi.ini
CREATE_OBJECT TSockAddr TSockAddrData
CREATE_OBJECT TL2CAPSockAddr TL2CAPSockAddrData
COMMAND TSockAddrData Construct
COMMAND TL2CAPSockAddrData Cast BT-USER-L2CapSockAddr-PublicApi-0003-0001command4Cast
END_TEST_BLOCK
END_TESTCASE BT-USER-L2CapSockAddr-PublicApi-4003
START_TESTCASE BT-USER-L2CapSockAddr-PublicApi-4004
//! @SYMTestCaseID BT-USER-L2CapSockAddr-PublicApi-4004
//! @SYMAPI TL2CAPSockAddr
//! @SYMTestCaseDesc Set and get the port of an TL2CAPSockAddr
//! Uses API elements: TL2CAPSockAddr(), SetPort() and Port()
//! @SYMTestActions 1. Create a new empty TL2CAPSockAddr object
//! 2. Set the TL2CAPSockAddr port value (decimal 55)
//! 3. Get the TL2CAPSockAddr port value (decimal 55)
//!
//! @SYMTestStatus Implemented
//! @SYMTestPriority Low
//! @SYMTestExpectedResults TL2CAPSockAddr port value has been set and TL2CAPSockAddr port value returned
//! @SYMTestType CIT
START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-L2CapSockAddr-PublicApi.ini
CREATE_OBJECT TL2CAPSockAddr TL2CAPSockAddrData
COMMAND TL2CAPSockAddrData TL2CAPSockAddr
COMMAND TL2CAPSockAddrData SetPort BT-USER-L2CapSockAddr-PublicApi-0004-0001command2SetPort
COMMAND TL2CAPSockAddrData Port BT-USER-L2CapSockAddr-PublicApi-0004-0001command3Port
END_TEST_BLOCK
END_TESTCASE BT-USER-L2CapSockAddr-PublicApi-4004
DELAY 2000