author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Thu, 07 Jan 2010 13:38:45 +0200 | |
changeset 6 | 0173bcd7697c |
parent 2 | 4122176ea935 |
permissions | -rw-r--r-- |
0 | 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 |
|
2
4122176ea935
Revision: 200948 + Removing redundant base integration tests and fixing build errors
John Imhofe <john.imhofe@nokia.com>
parents:
0
diff
changeset
|
5 |
// under the terms of "Eclipse Public License v1.0" |
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 |
// |
|
2
4122176ea935
Revision: 200948 + Removing redundant base integration tests and fixing build errors
John Imhofe <john.imhofe@nokia.com>
parents:
0
diff
changeset
|
14 |
// Description: |
0 | 15 |
// |
16 |
//! @file |
|
17 |
//! @SYMTestSuiteName pbase-f32-sfsrv-publicapi-rem |
|
18 |
//! @SYMScriptTestEnvironment This test script requires a basic ROM. |
|
19 |
//! @SYMScriptAuthor Dmitri Trofimov |
|
20 |
//! @SYMScriptDescription The test script contains API tests for the following functions of TFindFile class: |
|
21 |
//! @SYMCreationDate 17/12/2006 |
|
22 |
//! TFindFile(RFs &aFs); |
|
23 |
//! TInt FindByDir(const TDesC &aFileName, const TDesC &aDirPath); |
|
24 |
//! TInt FindWildByDir(const TDesC &aFileName, const TDesC &aDirPath, CDir *&aDir); |
|
25 |
//! TInt Find(); |
|
26 |
//! TInt FindWild(CDir *&aDirList); |
|
27 |
//! const TDesC &File() const; |
|
28 |
//! TInt SetFindMask(TUint aMask); |
|
29 |
||
30 |
LOAD_SUITE T_SfSrv |
|
31 |
DELAY 5000 |
|
32 |
||
33 |
||
34 |
START_TESTCASE SETUP_FILES |
|
35 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini |
|
36 |
CREATE_OBJECT RFs RFs1 |
|
37 |
CREATE_OBJECT CFileMan CFileMan1 |
|
38 |
COMMAND RFs1 new |
|
39 |
COMMAND RFs1 Connect |
|
40 |
COMMAND RFs1 MkDirAll test_dir |
|
41 |
COMMAND RFs1 MkDirAll test_dir1 |
|
42 |
COMMAND RFs1 MkDirAll test_rem_dir |
|
43 |
COMMAND RFs1 MkDirAll test_rem_dir1 |
|
44 |
COMMAND CFileMan1 NewL fileman_fs |
|
45 |
COMMAND CFileMan1 Copy test_file1 |
|
46 |
COMMAND CFileMan1 Close |
|
47 |
COMMAND CFileMan1 Copy test_rem_file1 |
|
48 |
COMMAND CFileMan1 Close |
|
49 |
COMMAND CFileMan1 ~ |
|
50 |
COMMAND RFs1 ~ |
|
51 |
END_TEST_BLOCK |
|
52 |
END_TESTCASE SETUP_FILES |
|
53 |
||
54 |
||
55 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0019 |
|
56 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0019 |
|
57 |
//! @SYMAPI TFindFile |
|
58 |
//! @SYMTestCaseDesc Find() test. This tests for successful finding of file after FindByDir() call. |
|
59 |
//! Uses API elements: FindByDir(), Find(), File() |
|
60 |
//! @SYMTestActions 1. Create RFs object. |
|
61 |
//! 2. Create RDir object. |
|
62 |
//! 3. Create TFindFile object passing a reference to the connected file session as a parameter. |
|
63 |
//! 4. Call FindByDir() passing file name "Test1.txt" and path "\base\t_sfsrv\t_findfile\test1\" as arguments. |
|
64 |
//! 5. Call File() with checking that value is '\base\t_sfsrv\t_findfile\test1\Test1.txt' |
|
65 |
//! 60.Call Find(). |
|
66 |
//! 71.Call File() with checking that value is 'x:\base\t_sfsrv\t_findfile\test1\Test1.txt' |
|
67 |
//! |
|
68 |
//! @SYMTestStatus Implemented |
|
69 |
//! @SYMTestPriority Critical |
|
70 |
//! @SYMTestExpectedResults Find() returns KErrNone. |
|
71 |
//! @SYMTestType CIT |
|
72 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini |
|
73 |
CREATE_OBJECT RFs RFs1 |
|
74 |
CREATE_OBJECT RDir RDir1 |
|
75 |
CREATE_OBJECT TFindFile TFindFile1 |
|
76 |
COMMAND RFs1 new |
|
77 |
COMMAND RDir1 new |
|
78 |
COMMAND RFs1 Connect |
|
79 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0019-command4new |
|
80 |
COMMAND TFindFile1 FindByDir PBASE-F32-FindFile-PublicApi-0019-command5FindByDir |
|
81 |
COMMAND TFindFile1 File correct_file_path |
|
82 |
COMMAND TFindFile1 Find |
|
83 |
COMMAND TFindFile1 File rem_correct_file_path |
|
84 |
COMMAND TFindFile1 ~ |
|
85 |
COMMAND RDir1 ~ |
|
86 |
COMMAND RFs1 ~ |
|
87 |
END_TEST_BLOCK |
|
88 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0019 |
|
89 |
||
90 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0023 |
|
91 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0023 |
|
92 |
//! @SYMAPI TFindFile |
|
93 |
//! @SYMTestCaseDesc FindWild() test. This test for successful finding of file ather FindWildByDir() call. |
|
94 |
//! Uses API elements: FindWildByDir(), FindWild() |
|
95 |
//! @SYMTestActions 1. Create RFs object. |
|
96 |
//! 2. Call Connect(). |
|
97 |
//! 3. Create TFindFile object passing a reference to the connected file session as a parameter. |
|
98 |
//! 4. Call FindWildByDir() passing file name "Test1.*" and path "\base\t_sfsrv\t_findfile\test1\" as arguments. |
|
99 |
//! 5. Call FindWild(). |
|
100 |
//! |
|
101 |
//! @SYMTestStatus Implemented |
|
102 |
//! @SYMTestPriority Critical |
|
103 |
//! @SYMTestExpectedResults FindWild() returns KErrNone. FindWild find file on another RAM drive. |
|
104 |
//! @SYMTestType CIT |
|
105 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini |
|
106 |
CREATE_OBJECT RFs RFs1 |
|
107 |
CREATE_OBJECT TFindFile TFindFile1 |
|
108 |
CREATE_OBJECT TEntry TEntry1 |
|
109 |
CREATE_OBJECT CDir CDir1 |
|
110 |
COMMAND RFs1 new |
|
111 |
COMMAND RFs1 Connect |
|
112 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0023-command4new |
|
113 |
COMMAND TFindFile1 FindWildByDir PBASE-F32-FindFile-PublicApi-0023-command5FindWildByDir |
|
114 |
COMMAND TFindFile1 FindWild common_dir_wrapper |
|
115 |
COMMAND TFindFile1 ~ |
|
116 |
COMMAND RFs1 ~ |
|
117 |
END_TEST_BLOCK |
|
118 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0023 |
|
119 |
||
120 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0026 |
|
121 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0026 |
|
122 |
//! @SYMAPI TFindFile |
|
123 |
//! @SYMTestCaseDesc FindByDir() test. This tests for function to return correct data. |
|
124 |
//! Uses API elements: FindByDir(), SetFindMask(), File() |
|
125 |
//! @SYMTestActions 1. Create RFs object. |
|
126 |
//! 2. Call Connect(). |
|
127 |
//! 3. Call SetFindMask() with invalid parameter . |
|
128 |
//! 4. Call SetFindMask() KDriveAttRemovable as passed parameter. |
|
129 |
//! 5. Create TFindFile object passing a reference to the connected file session as a parameter. |
|
130 |
//! 6. Call FindByDir() passing file name "Test1.txt" and path "\base\t_sfsrv\t_findfile\test1\" as arguments. |
|
131 |
//! 7. Call Find() to switch path to removable drive |
|
132 |
//! 8. Call File() with checking that value is 'X:\base\t_sfsrv\t_findfile\test1\Test1.txt' |
|
133 |
//! |
|
134 |
//! @SYMTestStatus Implemented |
|
135 |
//! @SYMTestPriority Critical |
|
136 |
//! @SYMTestExpectedResults SetFindMask() with invalid parameter returns KErrArgument. and File returns a path on removable drive. |
|
137 |
//! @SYMTestType CIT |
|
138 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini |
|
139 |
CREATE_OBJECT RFs RFs1 |
|
140 |
CREATE_OBJECT TFindFile TFindFile1 |
|
141 |
CREATE_OBJECT TEntry TEntry1 |
|
142 |
CREATE_OBJECT CDir CDir1 |
|
143 |
COMMAND RFs1 new |
|
144 |
COMMAND RFs1 Connect |
|
145 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0026-command4new |
|
146 |
COMMAND !Error=-6 TFindFile1 SetFindMask PBASE-F32-FindFile-PublicApi-0026__mask_params |
|
147 |
COMMAND TFindFile1 SetFindMask find_mask_params |
|
148 |
COMMAND TFindFile1 FindByDir PBASE-F32-FindFile-PublicApi-0026-command5FindByDir |
|
149 |
COMMAND TFindFile1 Find |
|
150 |
COMMAND TFindFile1 ~ |
|
151 |
COMMAND RFs1 ~ |
|
152 |
END_TEST_BLOCK |
|
153 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0026 |
|
154 |
||
155 |
||
156 |
START_TESTCASE REMOVE_FILES |
|
157 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini |
|
158 |
CREATE_OBJECT RFs RFs1 |
|
159 |
CREATE_OBJECT CFileMan CFileMan1 |
|
160 |
COMMAND RFs1 new |
|
161 |
COMMAND RFs1 Connect |
|
162 |
COMMAND CFileMan1 NewL fileman_fs |
|
163 |
COMMAND CFileMan1 Delete all_files1 |
|
164 |
COMMAND CFileMan1 Delete all_rem_files1 |
|
165 |
COMMAND RFs1 RmDir test_dir1 |
|
166 |
COMMAND RFs1 RmDir test_dir |
|
167 |
COMMAND RFs1 RmDir test_rem_dir1 |
|
168 |
COMMAND RFs1 RmDir test_rem_dir |
|
169 |
COMMAND CFileMan1 ~ |
|
170 |
COMMAND RFs1 ~ |
|
171 |
END_TEST_BLOCK |
|
172 |
END_TESTCASE REMOVE_FILES |