bluetoothapitest/bluetoothsvs/T_BTUserAPI/scripts/bt-user-avdtpsepinfo-publishedpartner.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 published partner elements of the TAvdtpSEPInfo 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


// ****************************************************************************
// TAvdtpSEPInfo
// **************************************************************************** 

START_TESTCASE BT-USER-AvdtpSEPInfo-PublishedPartner-0001
//! @SYMTestCaseID              BT-USER-AvdtpSEPInfo-PublishedPartner-0001
//! @SYMAPI                     TAvdtpSEPInfo::TAvdtpSEPInfo()
//! @SYMAuthor                  Wekey Weng
//! @SYMCreationDate            02/29/2008
//! @SYMTestCaseDesc            Default constructor
//! @SYMTestActions             1. Create a TAvdtpSEPInfo object
//!                             2. Destruct the TAvdtpSEPInfo object
//! @SYMTestStatus              Implemented
//! @SYMTestPriority            Low
//! @SYMTestExpectedResults     The TAvdtpSEPInfo object is created successfully
//! @SYMTestType                CIT

    START_TEST_BLOCK    10  T_BTUserAPI         \bluetooth\user\BT-USER-AvdtpSEPInfo-PublishedPartner.ini
            CREATE_OBJECT   TAvdtpSEPInfo       avdtpsepinfo
            COMMAND         avdtpsepinfo        new
            COMMAND         avdtpsepinfo        ~
    END_TEST_BLOCK
    
END_TESTCASE BT-USER-AvdtpSEPInfo-PublishedPartner-0001

START_TESTCASE BT-USER-AvdtpSEPInfo-PublishedPartner-0002
//! @SYMTestCaseID              BT-USER-AvdtpSEPInfo-PublishedPartner-0002
//! @SYMAPI                     TAvdtpSEPInfo::SetSEID();
//!                             TAvdtpSEPInfo::SEID()
//! @SYMAuthor                  Wekey Weng
//! @SYMCreationDate            02/29/2008
//! @SYMTestCaseDesc            Set SEID into the TAvdtpSEPInfo object and get it.
//! @SYMTestActions             1. Create a TAvdtpSEPInfo object
//!                             2. Create a TSEID(255, EFalse) object
//!                             3. Get the SEID from the TAvdtpSEPInfo object
//!                             4. Destruct the TAvdtpSEPInfo object and 2 TSEID objects.
//! @SYMTestStatus              Implemented
//! @SYMTestPriority            High
//! @SYMTestExpectedResults     1. Called without causing panic and returns value as expected
//!                             1.1 Step 3 returns the SEID as expected. The return SEID may not be the same in differnt environment and this case may fail.
//! @SYMTestType                CIT

    START_TEST_BLOCK    10  T_BTUserAPI         \bluetooth\user\BT-USER-AvdtpSEPInfo-PublishedPartner.ini
            CREATE_OBJECT   TAvdtpSEPInfo       avdtpsepinfo
            CREATE_OBJECT   TSEID               seid
            COMMAND         avdtpsepinfo        new
            COMMAND         seid                new         BT-USER-AvdtpSEPInfo-PublishedPartner-0002-0001-new_Command2
            COMMAND         avdtpsepinfo        SEID        BT-USER-AvdtpSEPInfo-PublishedPartner-0002-0001-SEID_Command3
            COMMAND         avdtpsepinfo        ~
            COMMAND         seid                ~
    END_TEST_BLOCK
    
END_TESTCASE BT-USER-AvdtpSEPInfo-PublishedPartner-0002

START_TESTCASE BT-USER-AvdtpSEPInfo-PublishedPartner-0003
//! @SYMTestCaseID              BT-USER-AvdtpSEPInfo-PublishedPartner-0003
//! @SYMAPI                     TAvdtpSEPInfo::SetInUse();
//!                             TAvdtpSEPInfo::InUse()
//! @SYMAuthor                  Wekey Weng
//! @SYMCreationDate            02/29/2008
//! @SYMTestCaseDesc            Set whether the Stream End Point (SEP) is in use, then get it.
//! @SYMTestActions             1. Create a TAvdtpSEPInfo object
//!                             2. Get the use status of the TAvdtpSEPInfo object
//!                             3. Destruct the TAvdtpSEPInfo object
//! @SYMTestStatus              Implemented
//! @SYMTestPriority            High
//! @SYMTestExpectedResults     1. Called without causing panic and returns value as expected
//!                             1.1 Step 2 returns EFalse. This return value may not be the same in differnt environment and this case may fail.
//! @SYMTestType                CIT

    START_TEST_BLOCK    10  T_BTUserAPI         \bluetooth\user\BT-USER-AvdtpSEPInfo-PublishedPartner.ini
            CREATE_OBJECT   TAvdtpSEPInfo       avdtpsepinfo
            COMMAND         avdtpsepinfo        new
            COMMAND         avdtpsepinfo        InUse        BT-USER-AvdtpSEPInfo-PublishedPartner-0003-0001-InUse_Command2
            COMMAND         avdtpsepinfo        ~
    END_TEST_BLOCK
    
END_TESTCASE BT-USER-AvdtpSEPInfo-PublishedPartner-0003

START_TESTCASE BT-USER-AvdtpSEPInfo-PublishedPartner-0004
//! @SYMTestCaseID              BT-USER-AvdtpSEPInfo-PublishedPartner-0004
//! @SYMAPI                     TAvdtpSEPInfo::SetMediaType(SymbianBluetoothAV::TBluetoothMediaType);
//!                             TAvdtpSEPInfo::MediaType()
//! @SYMAuthor                  Wekey Weng
//! @SYMCreationDate            02/29/2008
//! @SYMTestCaseDesc            Set media type into the TAvdtpSEPInfo object and get it.
//! @SYMTestActions             1. Create a TAvdtpSEPInfo object
//!                             2. Set media type (EAvdtpMediaTypeAudio) into the TAvdtpSETInfo object
//!                             3. Get the media type of the TAvdtpSEPInfo object
//!                             4. Set media type (EAvdtpMediaTypeVideo) into the TAvdtpSETInfo object
//!                             5. Get the media type of the TAvdtpSEPInfo object
//!                             6. Set media type (EAvdtpMediaTypeMultimedia) into the TAvdtpSETInfo object
//!                             7. Get the media type of the TAvdtpSEPInfo object
//!                             8. Destruct  the TAvdtpSEPInfo object
//! @SYMTestStatus              Implemented
//! @SYMTestPriority            High
//! @SYMTestExpectedResults     1. Called without causing panic and returns value as expected
//!                             1.1 Step 3 returns EAvdtpMediaTypeAudio
//!                             1.2 Step 5 returns EAvdtpMediaTypeVideo
//!                             1.3 Step 7 returns EAvdtpMediaTypeMultimedia
//! @SYMTestType                CIT

    START_TEST_BLOCK    10  T_BTUserAPI         \bluetooth\user\BT-USER-AvdtpSEPInfo-PublishedPartner.ini
            CREATE_OBJECT   TAvdtpSEPInfo       avdtpsepinfo
            COMMAND         avdtpsepinfo        new
            COMMAND         avdtpsepinfo        SetMediaType     BT-USER-AvdtpSEPInfo-PublishedPartner-0004-0001-SetMediaType_Command2
            COMMAND         avdtpsepinfo        MediaType        BT-USER-AvdtpSEPInfo-PublishedPartner-0004-0001-MediaType_Command3
            COMMAND         avdtpsepinfo        SetMediaType     BT-USER-AvdtpSEPInfo-PublishedPartner-0004-0001-SetMediaType_Command4
            COMMAND         avdtpsepinfo        MediaType        BT-USER-AvdtpSEPInfo-PublishedPartner-0004-0001-MediaType_Command5
            COMMAND         avdtpsepinfo        SetMediaType     BT-USER-AvdtpSEPInfo-PublishedPartner-0004-0001-SetMediaType_Command6
            COMMAND         avdtpsepinfo        MediaType        BT-USER-AvdtpSEPInfo-PublishedPartner-0004-0001-MediaType_Command7
            COMMAND         avdtpsepinfo        ~
    END_TEST_BLOCK
    
END_TESTCASE BT-USER-AvdtpSEPInfo-PublishedPartner-0004

START_TESTCASE BT-USER-AvdtpSEPInfo-PublishedPartner-0005
//! @SYMTestCaseID              BT-USER-AvdtpSEPInfo-PublishedPartner-0005
//! @SYMAPI                     TAvdtpSEPInfo::SetIsSink(TBool );
//!                             TAvdtpSEPInfo::IsSink()
//! @SYMAuthor                  Wekey Weng
//! @SYMCreationDate            02/29/2008
//! @SYMTestCaseDesc            Set value which makes the SEP is source or sink and get it.
//! @SYMTestActions             1. Create a TAvdtpSEPInfo object
//!                             2. Set the TAvdtpSETInfo object as a sink
//!                             3. Get value of whether the TAvdtpSETInfo object is a sink
//!                             4. Set the TAvdtpSETInfo object not as a sink
//!                             5. Get value of whether the TAvdtpSETInfo object is a sink
//!                             6. Destruct  the TAvdtpSEPInfo object
//! @SYMTestStatus              Implemented
//! @SYMTestPriority            High
//! @SYMTestExpectedResults     1. Called without causing panic and returns value as expected
//!                             1.1 Step 3 returns ETrue
//!                             1.2 Step 5 returns EFalse
//! @SYMTestType                CIT

    START_TEST_BLOCK    10  T_BTUserAPI         \bluetooth\user\BT-USER-AvdtpSEPInfo-PublishedPartner.ini
            CREATE_OBJECT   TAvdtpSEPInfo       avdtpsepinfo
            COMMAND         avdtpsepinfo        new
            COMMAND         avdtpsepinfo        SetIsSink     BT-USER-AvdtpSEPInfo-PublishedPartner-0005-0001-SetIsSink_Command2
            COMMAND         avdtpsepinfo        IsSink        BT-USER-AvdtpSEPInfo-PublishedPartner-0005-0001-IsSink_Command3
            COMMAND         avdtpsepinfo        SetIsSink     BT-USER-AvdtpSEPInfo-PublishedPartner-0005-0001-SetIsSink_Command4
            COMMAND         avdtpsepinfo        IsSink        BT-USER-AvdtpSEPInfo-PublishedPartner-0005-0001-IsSink_Command5
            COMMAND         avdtpsepinfo        ~
    END_TEST_BLOCK
    
END_TESTCASE BT-USER-AvdtpSEPInfo-PublishedPartner-0005

DELAY		2000