|
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 public elements of the TRfcommRPNTransaction class |
|
21 //! as a means of confidence that the API works as expected. |
|
22 //! The purpose is to provide a regression test suite of PublishedAll 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 Ting Yen |
|
27 //! @SYMCreationDate 07/03/2007 |
|
28 /////////////////////////////////////////////////////////////////////////////// |
|
29 |
|
30 RUN_UTILS MkDir ${SYSDRIVE}\bluetooth\ |
|
31 RUN_UTILS MkDir ${SYSDRIVE}\bluetooth\user\ |
|
32 |
|
33 LOAD_SUITE T_BTUserAPI |
|
34 DELAY 500 |
|
35 |
|
36 |
|
37 // **************************************************************************** |
|
38 // TRfcommRPNTransaction |
|
39 // **************************************************************************** |
|
40 |
|
41 START_TESTCASE BT-USER-RfcommRPNTransaction-PublicApi-9999 |
|
42 //! @SYMTestCaseID BT-USER-RfcommRPNTransaction-PublicApi-9999 |
|
43 //! @SYMAPI TRfcommRPNTransaction and TRfcommRemotePortParams |
|
44 //! @SYMTestCaseDesc Create a TRfcommRPNTransaction object |
|
45 //! Uses API elements: TRfcommRemotePortParams::TRfcommRemotePortParams() |
|
46 //! SetXOffChar(), SetXOnChar(), SetStopBit(), SetParity(), |
|
47 //! SetDataBits(), SetBitRate(), GetXOffChar(), GetXOnChar(), |
|
48 //! GetStopBit(), GetParity(), GetDataBits(), GetBitRate() |
|
49 //! and |
|
50 //! TRfcommRPNTransaction::TRfcommRPNTransaction() |
|
51 //! @SYMTestActions 1. Construct a new empty TRfcommRemotePortParams object |
|
52 //! 2. Set the TRfcommRemotePortParams XOFF character (decimal 33) and return KErrNone |
|
53 //! 3. Set the TRfcommRemotePortParams XON character(decimal 22) and return KErrNone |
|
54 //! 4. Set the number of stop bits transmitted (EStop2) and return KErrNone |
|
55 //! 5. Set the parity type (EParityMark) and return KErrNone |
|
56 //! 6. Set the number of bits transmitted per character (EData5) and return KErrNone |
|
57 //! 7. Set the bit rate for the port (EBps57600) and return KErrNone |
|
58 //! 8. Construct a new empty TRfcommRPNTransaction object |
|
59 //! 9. Set iParaMask with a flow mask (decimal 123) and set iPortParams with |
|
60 //! TRfcommRemotePortParams object to TRfcommRPNTransaction object |
|
61 //! |
|
62 //! @SYMTestStatus Implemented |
|
63 //! @SYMTestPriority Low |
|
64 //! @SYMTestExpectedResults object created, iParaMask and iPortParams have been set |
|
65 //! @SYMTestType CIT |
|
66 |
|
67 START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-RfcommRPNTransaction-PublicApi.ini |
|
68 CREATE_OBJECT TRfcommRPNTransaction RFCOMMRPNTransaction |
|
69 CREATE_OBJECT TRfcommRemotePortParams RFCOMMRemotePortParams |
|
70 COMMAND RFCOMMRemotePortParams TRfcommRemotePortParams |
|
71 COMMAND RFCOMMRemotePortParams SetXOffChar BT-USER-RfcommRPNTransaction-PublicApi-0001-0001command3SetXOffChar |
|
72 COMMAND RFCOMMRemotePortParams SetXOnChar BT-USER-RfcommRPNTransaction-PublicApi-0001-0001command4SetXOnChar |
|
73 COMMAND RFCOMMRemotePortParams SetStopBit BT-USER-RfcommRPNTransaction-PublicApi-0001-0001command5SetStopBit |
|
74 COMMAND RFCOMMRemotePortParams SetParity BT-USER-RfcommRPNTransaction-PublicApi-0001-0001command6SetParity |
|
75 COMMAND RFCOMMRemotePortParams SetDataBits BT-USER-RfcommRPNTransaction-PublicApi-0001-0001command7SetDataBits |
|
76 COMMAND RFCOMMRemotePortParams SetBitRate BT-USER-RfcommRPNTransaction-PublicApi-0001-0001command8SetBitRate |
|
77 COMMAND RFCOMMRPNTransaction TRfcommRPNTransaction |
|
78 COMMAND RFCOMMRPNTransaction SetParamMask BT-USER-RfcommRPNTransaction-PublicApi-0001-0001command11SetParamMask |
|
79 COMMAND RFCOMMRPNTransaction SetPortParams BT-USER-RfcommRPNTransaction-PublicApi-0001-0001command12SetPortParams |
|
80 END_TEST_BLOCK |
|
81 |
|
82 END_TESTCASE BT-USER-RfcommRPNTransaction-PublicApi-9999 |
|
83 |
|
84 DELAY 2000 |