bluetoothapitest/bluetoothsvs/T_BTUserAPI/scripts/bt-user-avdtpsepinfo-publishedpartner.script
changeset 0 29b1cd4cb562
equal deleted inserted replaced
-1:000000000000 0:29b1cd4cb562
       
     1 //
       
     2 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 // All rights reserved.
       
     4 // This component and the accompanying materials are made available
       
     5 // under the terms of "Eclipse Public License v1.0"
       
     6 // which accompanies this distribution, and is available
       
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 //
       
     9 // Initial Contributors:
       
    10 // Nokia Corporation - initial contribution.
       
    11 //
       
    12 // Contributors:
       
    13 //
       
    14 // Description:
       
    15 //
       
    16 ///////////////////////////////////////////////////////////////////////////////
       
    17 //! @file
       
    18 //! @SYMTestSuiteName			T_BTUserAPI
       
    19 //! @SYMScriptTestEnvironment	This test script requires a basic ROM with bluetooth dongle.
       
    20 //! @SYMScriptDescription		Tests all published partner elements of the TAvdtpSEPInfo class
       
    21 //!								as a means of confidence that the API works as expected. 
       
    22 //!								The purpose is to provide a regression test suite of PublishedPartner APIs for 
       
    23 //!								BT USER related classes.
       
    24 //!								Negative testing is performed to confirm that correct errors are returned 
       
    25 //!								when incorrect parameters are given. The tests are fully automated.
       
    26 //! @SYMAuthor					Wekey Weng
       
    27 //! @SYMCreationDate			10/03/2008
       
    28 ///////////////////////////////////////////////////////////////////////////////
       
    29 
       
    30 
       
    31 RUN_UTILS MkDir ${SYSDRIVE}\bluetooth\user\
       
    32 
       
    33 LOAD_SUITE	T_BTUserAPI
       
    34 DELAY		500
       
    35 
       
    36 
       
    37 // ****************************************************************************
       
    38 // TAvdtpSEPInfo
       
    39 // **************************************************************************** 
       
    40 
       
    41 START_TESTCASE BT-USER-AvdtpSEPInfo-PublishedPartner-0001
       
    42 //! @SYMTestCaseID              BT-USER-AvdtpSEPInfo-PublishedPartner-0001
       
    43 //! @SYMAPI                     TAvdtpSEPInfo::TAvdtpSEPInfo()
       
    44 //! @SYMAuthor                  Wekey Weng
       
    45 //! @SYMCreationDate            02/29/2008
       
    46 //! @SYMTestCaseDesc            Default constructor
       
    47 //! @SYMTestActions             1. Create a TAvdtpSEPInfo object
       
    48 //!                             2. Destruct the TAvdtpSEPInfo object
       
    49 //! @SYMTestStatus              Implemented
       
    50 //! @SYMTestPriority            Low
       
    51 //! @SYMTestExpectedResults     The TAvdtpSEPInfo object is created successfully
       
    52 //! @SYMTestType                CIT
       
    53 
       
    54     START_TEST_BLOCK    10  T_BTUserAPI         \bluetooth\user\BT-USER-AvdtpSEPInfo-PublishedPartner.ini
       
    55             CREATE_OBJECT   TAvdtpSEPInfo       avdtpsepinfo
       
    56             COMMAND         avdtpsepinfo        new
       
    57             COMMAND         avdtpsepinfo        ~
       
    58     END_TEST_BLOCK
       
    59     
       
    60 END_TESTCASE BT-USER-AvdtpSEPInfo-PublishedPartner-0001
       
    61 
       
    62 START_TESTCASE BT-USER-AvdtpSEPInfo-PublishedPartner-0002
       
    63 //! @SYMTestCaseID              BT-USER-AvdtpSEPInfo-PublishedPartner-0002
       
    64 //! @SYMAPI                     TAvdtpSEPInfo::SetSEID();
       
    65 //!                             TAvdtpSEPInfo::SEID()
       
    66 //! @SYMAuthor                  Wekey Weng
       
    67 //! @SYMCreationDate            02/29/2008
       
    68 //! @SYMTestCaseDesc            Set SEID into the TAvdtpSEPInfo object and get it.
       
    69 //! @SYMTestActions             1. Create a TAvdtpSEPInfo object
       
    70 //!                             2. Create a TSEID(255, EFalse) object
       
    71 //!                             3. Get the SEID from the TAvdtpSEPInfo object
       
    72 //!                             4. Destruct the TAvdtpSEPInfo object and 2 TSEID objects.
       
    73 //! @SYMTestStatus              Implemented
       
    74 //! @SYMTestPriority            High
       
    75 //! @SYMTestExpectedResults     1. Called without causing panic and returns value as expected
       
    76 //!                             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.
       
    77 //! @SYMTestType                CIT
       
    78 
       
    79     START_TEST_BLOCK    10  T_BTUserAPI         \bluetooth\user\BT-USER-AvdtpSEPInfo-PublishedPartner.ini
       
    80             CREATE_OBJECT   TAvdtpSEPInfo       avdtpsepinfo
       
    81             CREATE_OBJECT   TSEID               seid
       
    82             COMMAND         avdtpsepinfo        new
       
    83             COMMAND         seid                new         BT-USER-AvdtpSEPInfo-PublishedPartner-0002-0001-new_Command2
       
    84             COMMAND         avdtpsepinfo        SEID        BT-USER-AvdtpSEPInfo-PublishedPartner-0002-0001-SEID_Command3
       
    85             COMMAND         avdtpsepinfo        ~
       
    86             COMMAND         seid                ~
       
    87     END_TEST_BLOCK
       
    88     
       
    89 END_TESTCASE BT-USER-AvdtpSEPInfo-PublishedPartner-0002
       
    90 
       
    91 START_TESTCASE BT-USER-AvdtpSEPInfo-PublishedPartner-0003
       
    92 //! @SYMTestCaseID              BT-USER-AvdtpSEPInfo-PublishedPartner-0003
       
    93 //! @SYMAPI                     TAvdtpSEPInfo::SetInUse();
       
    94 //!                             TAvdtpSEPInfo::InUse()
       
    95 //! @SYMAuthor                  Wekey Weng
       
    96 //! @SYMCreationDate            02/29/2008
       
    97 //! @SYMTestCaseDesc            Set whether the Stream End Point (SEP) is in use, then get it.
       
    98 //! @SYMTestActions             1. Create a TAvdtpSEPInfo object
       
    99 //!                             2. Get the use status of the TAvdtpSEPInfo object
       
   100 //!                             3. Destruct the TAvdtpSEPInfo object
       
   101 //! @SYMTestStatus              Implemented
       
   102 //! @SYMTestPriority            High
       
   103 //! @SYMTestExpectedResults     1. Called without causing panic and returns value as expected
       
   104 //!                             1.1 Step 2 returns EFalse. This return value may not be the same in differnt environment and this case may fail.
       
   105 //! @SYMTestType                CIT
       
   106 
       
   107     START_TEST_BLOCK    10  T_BTUserAPI         \bluetooth\user\BT-USER-AvdtpSEPInfo-PublishedPartner.ini
       
   108             CREATE_OBJECT   TAvdtpSEPInfo       avdtpsepinfo
       
   109             COMMAND         avdtpsepinfo        new
       
   110             COMMAND         avdtpsepinfo        InUse        BT-USER-AvdtpSEPInfo-PublishedPartner-0003-0001-InUse_Command2
       
   111             COMMAND         avdtpsepinfo        ~
       
   112     END_TEST_BLOCK
       
   113     
       
   114 END_TESTCASE BT-USER-AvdtpSEPInfo-PublishedPartner-0003
       
   115 
       
   116 START_TESTCASE BT-USER-AvdtpSEPInfo-PublishedPartner-0004
       
   117 //! @SYMTestCaseID              BT-USER-AvdtpSEPInfo-PublishedPartner-0004
       
   118 //! @SYMAPI                     TAvdtpSEPInfo::SetMediaType(SymbianBluetoothAV::TBluetoothMediaType);
       
   119 //!                             TAvdtpSEPInfo::MediaType()
       
   120 //! @SYMAuthor                  Wekey Weng
       
   121 //! @SYMCreationDate            02/29/2008
       
   122 //! @SYMTestCaseDesc            Set media type into the TAvdtpSEPInfo object and get it.
       
   123 //! @SYMTestActions             1. Create a TAvdtpSEPInfo object
       
   124 //!                             2. Set media type (EAvdtpMediaTypeAudio) into the TAvdtpSETInfo object
       
   125 //!                             3. Get the media type of the TAvdtpSEPInfo object
       
   126 //!                             4. Set media type (EAvdtpMediaTypeVideo) into the TAvdtpSETInfo object
       
   127 //!                             5. Get the media type of the TAvdtpSEPInfo object
       
   128 //!                             6. Set media type (EAvdtpMediaTypeMultimedia) into the TAvdtpSETInfo object
       
   129 //!                             7. Get the media type of the TAvdtpSEPInfo object
       
   130 //!                             8. Destruct  the TAvdtpSEPInfo object
       
   131 //! @SYMTestStatus              Implemented
       
   132 //! @SYMTestPriority            High
       
   133 //! @SYMTestExpectedResults     1. Called without causing panic and returns value as expected
       
   134 //!                             1.1 Step 3 returns EAvdtpMediaTypeAudio
       
   135 //!                             1.2 Step 5 returns EAvdtpMediaTypeVideo
       
   136 //!                             1.3 Step 7 returns EAvdtpMediaTypeMultimedia
       
   137 //! @SYMTestType                CIT
       
   138 
       
   139     START_TEST_BLOCK    10  T_BTUserAPI         \bluetooth\user\BT-USER-AvdtpSEPInfo-PublishedPartner.ini
       
   140             CREATE_OBJECT   TAvdtpSEPInfo       avdtpsepinfo
       
   141             COMMAND         avdtpsepinfo        new
       
   142             COMMAND         avdtpsepinfo        SetMediaType     BT-USER-AvdtpSEPInfo-PublishedPartner-0004-0001-SetMediaType_Command2
       
   143             COMMAND         avdtpsepinfo        MediaType        BT-USER-AvdtpSEPInfo-PublishedPartner-0004-0001-MediaType_Command3
       
   144             COMMAND         avdtpsepinfo        SetMediaType     BT-USER-AvdtpSEPInfo-PublishedPartner-0004-0001-SetMediaType_Command4
       
   145             COMMAND         avdtpsepinfo        MediaType        BT-USER-AvdtpSEPInfo-PublishedPartner-0004-0001-MediaType_Command5
       
   146             COMMAND         avdtpsepinfo        SetMediaType     BT-USER-AvdtpSEPInfo-PublishedPartner-0004-0001-SetMediaType_Command6
       
   147             COMMAND         avdtpsepinfo        MediaType        BT-USER-AvdtpSEPInfo-PublishedPartner-0004-0001-MediaType_Command7
       
   148             COMMAND         avdtpsepinfo        ~
       
   149     END_TEST_BLOCK
       
   150     
       
   151 END_TESTCASE BT-USER-AvdtpSEPInfo-PublishedPartner-0004
       
   152 
       
   153 START_TESTCASE BT-USER-AvdtpSEPInfo-PublishedPartner-0005
       
   154 //! @SYMTestCaseID              BT-USER-AvdtpSEPInfo-PublishedPartner-0005
       
   155 //! @SYMAPI                     TAvdtpSEPInfo::SetIsSink(TBool );
       
   156 //!                             TAvdtpSEPInfo::IsSink()
       
   157 //! @SYMAuthor                  Wekey Weng
       
   158 //! @SYMCreationDate            02/29/2008
       
   159 //! @SYMTestCaseDesc            Set value which makes the SEP is source or sink and get it.
       
   160 //! @SYMTestActions             1. Create a TAvdtpSEPInfo object
       
   161 //!                             2. Set the TAvdtpSETInfo object as a sink
       
   162 //!                             3. Get value of whether the TAvdtpSETInfo object is a sink
       
   163 //!                             4. Set the TAvdtpSETInfo object not as a sink
       
   164 //!                             5. Get value of whether the TAvdtpSETInfo object is a sink
       
   165 //!                             6. Destruct  the TAvdtpSEPInfo object
       
   166 //! @SYMTestStatus              Implemented
       
   167 //! @SYMTestPriority            High
       
   168 //! @SYMTestExpectedResults     1. Called without causing panic and returns value as expected
       
   169 //!                             1.1 Step 3 returns ETrue
       
   170 //!                             1.2 Step 5 returns EFalse
       
   171 //! @SYMTestType                CIT
       
   172 
       
   173     START_TEST_BLOCK    10  T_BTUserAPI         \bluetooth\user\BT-USER-AvdtpSEPInfo-PublishedPartner.ini
       
   174             CREATE_OBJECT   TAvdtpSEPInfo       avdtpsepinfo
       
   175             COMMAND         avdtpsepinfo        new
       
   176             COMMAND         avdtpsepinfo        SetIsSink     BT-USER-AvdtpSEPInfo-PublishedPartner-0005-0001-SetIsSink_Command2
       
   177             COMMAND         avdtpsepinfo        IsSink        BT-USER-AvdtpSEPInfo-PublishedPartner-0005-0001-IsSink_Command3
       
   178             COMMAND         avdtpsepinfo        SetIsSink     BT-USER-AvdtpSEPInfo-PublishedPartner-0005-0001-SetIsSink_Command4
       
   179             COMMAND         avdtpsepinfo        IsSink        BT-USER-AvdtpSEPInfo-PublishedPartner-0005-0001-IsSink_Command5
       
   180             COMMAND         avdtpsepinfo        ~
       
   181     END_TEST_BLOCK
       
   182     
       
   183 END_TESTCASE BT-USER-AvdtpSEPInfo-PublishedPartner-0005
       
   184 
       
   185 DELAY		2000