sl@0
|
1 |
//
|
sl@0
|
2 |
// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
// All rights reserved.
|
sl@0
|
4 |
// This component and the accompanying materials are made available
|
sl@0
|
5 |
// under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
6 |
// which accompanies this distribution, and is available
|
sl@0
|
7 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
//
|
sl@0
|
9 |
// Initial Contributors:
|
sl@0
|
10 |
// Nokia Corporation - initial contribution.
|
sl@0
|
11 |
//
|
sl@0
|
12 |
// Contributors:
|
sl@0
|
13 |
//
|
sl@0
|
14 |
// Description:
|
sl@0
|
15 |
//
|
sl@0
|
16 |
|
sl@0
|
17 |
|
sl@0
|
18 |
LOAD_SUITE tcaf
|
sl@0
|
19 |
LOAD_SUITE RTAUtils
|
sl@0
|
20 |
|
sl@0
|
21 |
RUN_UTILS MkDir c:\rta\
|
sl@0
|
22 |
RUN_UTILS MkDir c:\rta\testdata\
|
sl@0
|
23 |
RUN_UTILS MkDir c:\tcaf\
|
sl@0
|
24 |
RUN_UTILS MkDir c:\tcaf\testdata\
|
sl@0
|
25 |
RUN_UTILS MkDir c:\tcaf\testdata\TestAgentPrivateDir\
|
sl@0
|
26 |
|
sl@0
|
27 |
RUN_UTILS CopyFile z:\rta\testdata\*.* c:\rta\testdata\*.*
|
sl@0
|
28 |
RUN_UTILS CopyFile z:\tcaf\testdata\*.* c:\tcaf\testdata\*.*
|
sl@0
|
29 |
RUN_UTILS CopyFile z:\tcaf\testdata\TestAgentPrivateDir\*.* c:\tcaf\testdata\TestAgentPrivateDir\*.*
|
sl@0
|
30 |
|
sl@0
|
31 |
|
sl@0
|
32 |
START_TESTCASE SEC-CAF-STRATR-0001
|
sl@0
|
33 |
//! @SYMTestCaseID SEC-CAF-STRATR-0001
|
sl@0
|
34 |
//! @SYMTestCaseDesc CreateDrmArchive for content.xml
|
sl@0
|
35 |
RUN_TEST_STEP 100 RTAUtils CreateDrmArchive c:\tcaf\stringattributes.ini CreateDrmArchive
|
sl@0
|
36 |
END_TESTCASE SEC-CAF-STRATR-0001
|
sl@0
|
37 |
|
sl@0
|
38 |
START_TESTCASE SEC-CAF-STRATR-0002
|
sl@0
|
39 |
//! @SYMTestCaseID SEC-CAF-STRATR-0002
|
sl@0
|
40 |
//! @SYMTestCaseDesc copy stringattribute.content file to the private directory of the RTA, so the RTA gets picked
|
sl@0
|
41 |
RUN_TEST_STEP 100 tcaf CAFCopyFileStep c:\tcaf\stringattributes.ini PrivateCopyFileOk
|
sl@0
|
42 |
END_TESTCASE SEC-CAF-STRATR-0002
|
sl@0
|
43 |
|
sl@0
|
44 |
|
sl@0
|
45 |
START_TESTCASE SEC-CAF-STRATR-1909
|
sl@0
|
46 |
//-------------------------------------
|
sl@0
|
47 |
//-- Step to retrieve TransactionID
|
sl@0
|
48 |
//-------------------------------------
|
sl@0
|
49 |
//! @SYMTestCaseID SEC-CAF-STRATR-1909
|
sl@0
|
50 |
//! @SYMTestCaseDesc Test addition of new entry,TransactionID, in TStringAttribute
|
sl@0
|
51 |
//! @SYMCR CR0895
|
sl@0
|
52 |
//! @SYMREQ REQ 6526, 6527
|
sl@0
|
53 |
//! @SYMTestPriority High
|
sl@0
|
54 |
//! @SYMTestActions RTA gets picked to read the content file, gets the transactionid & compares it with expected value in the .ini file. Both shuold match.
|
sl@0
|
55 |
//! @SYMTestExpectedResults transactionid in the .ini file should be identical to the one in .content file.
|
sl@0
|
56 |
RUN_TEST_STEP 100 tcaf CAFStringAttributesStep c:\tcaf\stringattributes.ini TransactionIDAttribute
|
sl@0
|
57 |
END_TESTCASE SEC-CAF-STRATR-1909
|
sl@0
|
58 |
|
sl@0
|
59 |
START_TESTCASE SEC-CAF-STRATR-1914
|
sl@0
|
60 |
//---------------------------------------------------
|
sl@0
|
61 |
//-- Step to retrieve non existing transaction ID
|
sl@0
|
62 |
//---------------------------------------------------
|
sl@0
|
63 |
//! @SYMTestCaseID SEC-CAF-STRATR-1914
|
sl@0
|
64 |
//! @SYMTestCaseDesc Test retrieval of non-existing TransactionID, in TStringAttribute
|
sl@0
|
65 |
//! @SYMCR CR0895
|
sl@0
|
66 |
//! @SYMREQ REQ 6526, 6527
|
sl@0
|
67 |
//! @SYMTestPriority High
|
sl@0
|
68 |
//! @SYMTestActions RTA gets picked to read the content file, calls GetStringAttribute on transactionid and initiliases its value to "".
|
sl@0
|
69 |
//! @SYMTestExpectedResults expected value is empty string since there is not TransactionID attribute in this content, and expected result is KErrNotfound.
|
sl@0
|
70 |
RUN_TEST_STEP 100 tcaf CAFStringAttributesStep c:\tcaf\stringattributes.ini NonExistingTransactionIDAttribute
|
sl@0
|
71 |
END_TESTCASE SEC-CAF-STRATR-1914
|
sl@0
|
72 |
|
sl@0
|
73 |
|
sl@0
|
74 |
|
sl@0
|
75 |
START_TESTCASE SEC-CAF-STRATR-1915
|
sl@0
|
76 |
//-----------------------------------------------------------------
|
sl@0
|
77 |
//-- Step to retrieve transaction ID using GetStringAttributeSet.
|
sl@0
|
78 |
//-----------------------------------------------------------------
|
sl@0
|
79 |
//! @SYMTestCaseID SEC-CAF-STRATR-1915
|
sl@0
|
80 |
//! @SYMTestCaseDesc Test TransactionID retrieval calling GetStringAttributeSet()
|
sl@0
|
81 |
//! @SYMCR CR0895
|
sl@0
|
82 |
//! @SYMREQ REQ 6526, 6527
|
sl@0
|
83 |
//! @SYMTestPriority High
|
sl@0
|
84 |
//! @SYMTestActions RTA gets picked to read the content file, gets the transactionid, the contentid and compares them with expected values.
|
sl@0
|
85 |
//! @SYMTestExpectedResults transactionid & contentid should be the same as the ones defined in the .ini file.
|
sl@0
|
86 |
RUN_TEST_STEP 100 tcaf CAFDataStringAttributeSetStep c:\tcaf\stringattributes.ini StringAttributeSet
|
sl@0
|
87 |
END_TESTCASE SEC-CAF-STRATR-1915
|
sl@0
|
88 |
|
sl@0
|
89 |
|
sl@0
|
90 |
START_TESTCASE SEC-CAF-STRATR-3156
|
sl@0
|
91 |
//! @SYMTestCaseID SEC-CAF-STRATR-3156
|
sl@0
|
92 |
//! @SYMTestCaseDesc Test TransactionID retrieval calling GetStringAttributeSet()
|
sl@0
|
93 |
//! @SYMCR CR0895
|
sl@0
|
94 |
//! @SYMREQ REQ 6526, 6527
|
sl@0
|
95 |
//! @SYMTestPriority High
|
sl@0
|
96 |
//! @SYMTestActions RTA gets picked to read the content file, gets the transactionid, the contentid and compares them with expected values.
|
sl@0
|
97 |
//! @SYMTestExpectedResults transactionid & contentid should be the same as the ones defined in the .ini file.
|
sl@0
|
98 |
RUN_TEST_STEP 100 tcaf CAFManagerStringAttributeSetStep c:\tcaf\stringattributes.ini StringAttributeSet
|
sl@0
|
99 |
END_TESTCASE SEC-CAF-STRATR-3156
|
sl@0
|
100 |
|
sl@0
|
101 |
|
sl@0
|
102 |
START_TESTCASE SEC-CAF-STRATR-1916
|
sl@0
|
103 |
//-------------------------------------------------
|
sl@0
|
104 |
//-- Step to retrieve 1char long transaction ID
|
sl@0
|
105 |
//-------------------------------------------------
|
sl@0
|
106 |
//! @SYMTestCaseID SEC-CAF-STRATR-1916
|
sl@0
|
107 |
//! @SYMTestCaseDesc Test 1char long transactionid
|
sl@0
|
108 |
//! @SYMCR CR0895
|
sl@0
|
109 |
//! @SYMREQ REQ 6526, 6527
|
sl@0
|
110 |
//! @SYMTestPriority High
|
sl@0
|
111 |
//! @SYMTestActions RTA gets picked to read the content file, gets the transactionid & compares it with expected value in the .ini file. Both should match.
|
sl@0
|
112 |
//! @SYMTestExpectedResults transactionid in the .ini file should be identical to the one in .content file.
|
sl@0
|
113 |
RUN_TEST_STEP 100 tcaf CAFStringAttributesStep c:\tcaf\stringattributes.ini TransactionIDAttribute1char
|
sl@0
|
114 |
END_TESTCASE SEC-CAF-STRATR-1916
|
sl@0
|
115 |
|
sl@0
|
116 |
|
sl@0
|
117 |
START_TESTCASE SEC-CAF-STRATR-1919
|
sl@0
|
118 |
//-------------------------------------------------
|
sl@0
|
119 |
//-- Step to retrieve 13char long Transaction ID
|
sl@0
|
120 |
//-------------------------------------------------
|
sl@0
|
121 |
//! @SYMTestCaseID SEC-CAF-STRATR-1919
|
sl@0
|
122 |
//! @SYMTestCaseDesc Test 13char long transactionid
|
sl@0
|
123 |
//! @SYMCR CR0895
|
sl@0
|
124 |
//! @SYMREQ REQ 6526, 6527
|
sl@0
|
125 |
//! @SYMTestPriority High
|
sl@0
|
126 |
//! @SYMTestActions RTA gets picked to read the content file, gets the transactionid & compares it with expected value in the .ini file. Both should match.
|
sl@0
|
127 |
//! @SYMTestExpectedResults transactionid in the .ini file should be identical to the one in .content file.
|
sl@0
|
128 |
RUN_TEST_STEP 100 tcaf CAFStringAttributesStep c:\tcaf\stringattributes.ini TransactionIDAttribute13char
|
sl@0
|
129 |
END_TESTCASE SEC-CAF-STRATR-1919
|
sl@0
|
130 |
|
sl@0
|
131 |
|
sl@0
|
132 |
START_TESTCASE SEC-CAF-STRATR-1918
|
sl@0
|
133 |
//--------------------------------------------------
|
sl@0
|
134 |
//-- Step to retrieve 257char long transaction ID
|
sl@0
|
135 |
//--------------------------------------------------
|
sl@0
|
136 |
//! @SYMTestCaseID SEC-CAF-STRATR-1918
|
sl@0
|
137 |
//! @SYMTestCaseDesc Test addition of new entry,TransactionID, in TStringAttribute
|
sl@0
|
138 |
//! @SYMCR CR0895
|
sl@0
|
139 |
//! @SYMREQ REQ 6526, 6527
|
sl@0
|
140 |
//! @SYMTestPriority High
|
sl@0
|
141 |
//! @SYMTestActions RTA gets picked to read the content file, gets the transactionid & compares it with expected value in the .ini file.
|
sl@0
|
142 |
//! @SYMTestExpectedResults An overflow error is expected as size of transaction ID is greater than the client side buffer size.
|
sl@0
|
143 |
RUN_TEST_STEP 100 tcaf CAFStringAttributesStep c:\tcaf\stringattributes.ini 257LengthTransactionIDAttribute
|
sl@0
|
144 |
END_TESTCASE SEC-CAF-STRATR-1918
|
sl@0
|
145 |
|
sl@0
|
146 |
|
sl@0
|
147 |
START_TESTCASE SEC-CAF-STRATR-3384
|
sl@0
|
148 |
//--------------------------------------------------
|
sl@0
|
149 |
// Regression tests for DEF 101676
|
sl@0
|
150 |
//--------------------------------------------------
|
sl@0
|
151 |
//! @SYMTestCaseID SEC-CAF-STRATR-3384
|
sl@0
|
152 |
//! @SYMTestCaseDesc Test of GetStringAttribute functions in RTA Content module
|
sl@0
|
153 |
//! @SYMDEF DEF101676
|
sl@0
|
154 |
//! @SYMTestPriority High
|
sl@0
|
155 |
//! @SYMTestActions RTA gets picked to read the content file, gets the StringAttribute values & compares them with expected values in the .ini file.
|
sl@0
|
156 |
//! @SYMTestExpectedResults The values should match those in the .ini file
|
sl@0
|
157 |
RUN_TEST_STEP 100 tcaf CAFContentStringAttributeStep c:\tcaf\stringattributes.ini ContentStringAttribute
|
sl@0
|
158 |
RUN_TEST_STEP 100 tcaf CAFContentStringAttributeSetStep c:\tcaf\stringattributes.ini StringAttributeSet
|
sl@0
|
159 |
END_TESTCASE SEC-CAF-STRATR-3384
|
sl@0
|
160 |
|
sl@0
|
161 |
|
sl@0
|
162 |
START_TESTCASE SEC-CAF-STRATR-3399
|
sl@0
|
163 |
//--------------------------------------------------
|
sl@0
|
164 |
// Testing new entries added for DEF102465
|
sl@0
|
165 |
//--------------------------------------------------
|
sl@0
|
166 |
//! @SYMTestCaseID SEC-CAF-STRATR-3399
|
sl@0
|
167 |
//! @SYMTestCaseDesc Test addition of new entries in TStringAttribute: EContentLocation & ERightsIssuerURI, and in TAttribute: EContentVersion
|
sl@0
|
168 |
//! @SYMDEF DEF102465
|
sl@0
|
169 |
//! @SYMTestPriority High
|
sl@0
|
170 |
//! @SYMTestActions RTA gets picked to read the content file, gets the attributes & compares them with expected values in the .ini file.
|
sl@0
|
171 |
//! @SYMTestExpectedResults Attributes in the .ini file should be identical to the ones in .content file.
|
sl@0
|
172 |
RUN_TEST_STEP 100 tcaf CAFContentStringAttributeStep c:\tcaf\stringattributes.ini ContentLocationAttribute
|
sl@0
|
173 |
RUN_TEST_STEP 100 tcaf CAFContentStringAttributeStep c:\tcaf\stringattributes.ini RightsIssuerURIAttribute
|
sl@0
|
174 |
RUN_TEST_STEP 100 tcaf CAFContentAttributeStep c:\tcaf\stringattributes.ini ContentVersionAttribute
|
sl@0
|
175 |
END_TESTCASE SEC-CAF-STRATR-3399
|
sl@0
|
176 |
|
sl@0
|
177 |
|
sl@0
|
178 |
START_TESTCASE SEC-CAF-STRATR-0003
|
sl@0
|
179 |
//! @SYMTestCaseID SEC-CAF-STRATR-0003
|
sl@0
|
180 |
//! @SYMTestCaseDesc delete the copy created earlier
|
sl@0
|
181 |
RUN_TEST_STEP 100 tcaf CAFDeleteStep c:\tcaf\stringattributes.ini PrivateDeleteFileOk
|
sl@0
|
182 |
END_TESTCASE SEC-CAF-STRATR-0003
|
sl@0
|
183 |
|
sl@0
|
184 |
//delete content file
|
sl@0
|
185 |
RUN_UTILS Delete c:\tcaf\testdata\stringattribute.content
|
sl@0
|
186 |
|