os/kernelhwsrv/baseapitest/basesvs/validation/f32/sfsrv/scripts/PBASE-F32-Dir-PublicApi-RAM.script
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
//
sl@0
     2
// Copyright (c) 2005-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 "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
//! 	@file
sl@0
    17
//! 	@SYMTestSuiteName		pbase-f32-sfsrv-publicapi-ram
sl@0
    18
//!	@SYMScriptTestEnvironment	This test script requires a basic ROM.
sl@0
    19
//! 	@SYMScriptAuthor 		Jaanus Randveer, Runno Sgirka
sl@0
    20
//! 	@SYMScriptCreationDate		12/10/2007
sl@0
    21
//! 	@SYMScriptDescription		The test script contains API tests for the following functions of CDir class:
sl@0
    22
//!	TInt Count() const.
sl@0
    23
//!	const TEntry &operator[](TInt anIndex) const.
sl@0
    24
//!	TInt Sort(TUint aEntrySortKey).
sl@0
    25
sl@0
    26
sl@0
    27
LOAD_SUITE	T_SfSrv
sl@0
    28
DELAY	5000
sl@0
    29
sl@0
    30
sl@0
    31
START_TESTCASE 			PBASE-F32-Dir-PublicApi-0001
sl@0
    32
//! @SYMTestCaseID		PBASE-F32-Dir-PublicApi-0001
sl@0
    33
//! @SYMAPI			CDir
sl@0
    34
//! @SYMTestCaseDesc		Function Count() test, that counts entries in the array of directory entries.
sl@0
    35
//!				Uses API elements: Count().
sl@0
    36
//! @SYMTestActions		1.Create a RFs session and call it's Connect() function.
sl@0
    37
//!				2.Call RFs::GetDir(const TDesC &aName, TUint anEntryAttMask, TUint anEntrySortKey, CDir *&anEntryList), and 
sl@0
    38
//!				  <RAM_DRIVE>:\<RELATIVE_PATH>\dir\ (containing 4 files: big_line.txt, Test1.txt, Test2.txt, Test3.txt) as first parameter, 
sl@0
    39
//!				  KEntryAttHidden as second parameter, ESortByName as third parameter, CDir pointer as fourth parameter
sl@0
    40
//!				3.Call CDir::Count().
sl@0
    41
//! @SYMTestStatus		Implemented
sl@0
    42
//! @SYMTestPriority		Critical
sl@0
    43
//! @SYMTestExpectedResults	Function Count() finds 4 entries!
sl@0
    44
//! @SYMTestType		CIT
sl@0
    45
	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
    46
		CREATE_OBJECT	RFs		RFs1
sl@0
    47
		CREATE_OBJECT	CFileMan	CFileMan1
sl@0
    48
		COMMAND		RFs1		new			
sl@0
    49
		COMMAND		RFs1		Connect
sl@0
    50
		COMMAND		RFs1		MkDirAll		PBASE-F32-Dir-PublicApi-0001-001-MkDirAll_command004
sl@0
    51
		COMMAND		CFileMan1	NewL		PBASE-F32-Dir-PublicApi-0001-001-NewL_command005
sl@0
    52
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0001-001-Copy_command006
sl@0
    53
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0001-001-Copy_command007
sl@0
    54
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0001-001-Copy_command008
sl@0
    55
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0001-001-Copy_command009
sl@0
    56
		COMMAND		CFileMan1	~
sl@0
    57
		COMMAND		RFs1		~
sl@0
    58
	END_TEST_BLOCK	
sl@0
    59
	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
    60
		CREATE_OBJECT	RFs	RFs1
sl@0
    61
		CREATE_OBJECT	CDir	CDir1
sl@0
    62
		COMMAND		RFs1	new			
sl@0
    63
		COMMAND		RFs1	Connect		
sl@0
    64
		COMMAND		RFs1	GetDir			PBASE-F32-Dir-PublicApi-0001-002-GetDir_command004
sl@0
    65
		COMMAND		CDir1	Count			PBASE-F32-Dir-PublicApi-0001-002-Count_command005
sl@0
    66
		COMMAND		CDir1	~		
sl@0
    67
		COMMAND		RFs1	~		
sl@0
    68
	END_TEST_BLOCK
sl@0
    69
	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
    70
		CREATE_OBJECT	RFs		RFs1
sl@0
    71
		CREATE_OBJECT	CFileMan	CFileMan1
sl@0
    72
		COMMAND		RFs1		new			
sl@0
    73
		COMMAND		RFs1		Connect
sl@0
    74
		COMMAND		CFileMan1	NewL		PBASE-F32-Dir-PublicApi-0001-003-NewL_command004
sl@0
    75
		COMMAND		CFileMan1	Delete		PBASE-F32-Dir-PublicApi-0001-003-Delete_command005
sl@0
    76
		COMMAND		RFs1		RmDir		PBASE-F32-Dir-PublicApi-0001-003-RmDir_command006
sl@0
    77
		COMMAND		CFileMan1	~
sl@0
    78
		COMMAND		RFs1		~
sl@0
    79
	END_TEST_BLOCK	
sl@0
    80
END_TESTCASE 			PBASE-F32-Dir-PublicApi-0001
sl@0
    81
sl@0
    82
sl@0
    83
START_TESTCASE 			PBASE-F32-Dir-PublicApi-0002
sl@0
    84
//! @SYMTestCaseID		PBASE-F32-Dir-PublicApi-0002
sl@0
    85
//! @SYMAPI			CDir
sl@0
    86
//! @SYMTestCaseDesc		operator const TEntry &operator[](TInt anIndex) const test, that takes first entry from the array of directory entries.
sl@0
    87
//!				Uses API elements: operator[]().
sl@0
    88
//! @SYMTestActions		1.Create a RFs session and call it's Connect() function.
sl@0
    89
//!				2.Call RFs::GetDir(const TDesC &aName, TUint anEntryAttMask, TUint anEntrySortKey, CDir *&anEntryList), and 
sl@0
    90
//!				  <RAM_DRIVE>:\<RELATIVE_PATH>\Dir\ (containing 4 files: big_line.txt, Test1.txt, Test2.txt, Test3.txt) as first parameter,
sl@0
    91
//!			  	  KEntryAttHidden as second parameter, ESortByName as third parameter, CDir pointer as fourth parameter
sl@0
    92
//!				3.Create new TEntry object.
sl@0
    93
//!				4.Call CDir::operator[]() and pass 0 as parameter.		
sl@0
    94
//! @SYMTestStatus		Implemented
sl@0
    95
//! @SYMTestPriority		Critical
sl@0
    96
//! @SYMTestExpectedResults	First element is big_line.txt .
sl@0
    97
//! @SYMTestType		CIT
sl@0
    98
	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
    99
		CREATE_OBJECT	RFs		RFs1
sl@0
   100
		CREATE_OBJECT	CFileMan	CFileMan1
sl@0
   101
		COMMAND		RFs1		new			
sl@0
   102
		COMMAND		RFs1		Connect
sl@0
   103
		COMMAND		RFs1		MkDirAll		PBASE-F32-Dir-PublicApi-0002-001-MkDirAll_command004
sl@0
   104
		COMMAND		CFileMan1	NewL		PBASE-F32-Dir-PublicApi-0002-001-NewL_command005
sl@0
   105
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0002-001-Copy_command006
sl@0
   106
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0002-001-Copy_command007
sl@0
   107
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0002-001-Copy_command008
sl@0
   108
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0002-001-Copy_command009
sl@0
   109
		COMMAND		CFileMan1	~
sl@0
   110
		COMMAND		RFs1		~
sl@0
   111
	END_TEST_BLOCK	
sl@0
   112
	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   113
		CREATE_OBJECT	RFs	RFs1
sl@0
   114
		CREATE_OBJECT	TEntry	TEntry1
sl@0
   115
		CREATE_OBJECT	CDir	CDir1
sl@0
   116
		COMMAND		RFs1	new		
sl@0
   117
		COMMAND		RFs1	Connect		
sl@0
   118
		COMMAND		RFs1	GetDir		PBASE-F32-Dir-PublicApi-0002-002-GetDir_command005
sl@0
   119
		COMMAND		TEntry1	new
sl@0
   120
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0002-002-index_command007
sl@0
   121
		COMMAND		CDir1	~
sl@0
   122
		COMMAND		TEntry1	~		
sl@0
   123
		COMMAND		RFs1	~		
sl@0
   124
	END_TEST_BLOCK
sl@0
   125
	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   126
		CREATE_OBJECT	RFs		RFs1
sl@0
   127
		CREATE_OBJECT	CFileMan	CFileMan1
sl@0
   128
		COMMAND		RFs1		new			
sl@0
   129
		COMMAND		RFs1		Connect
sl@0
   130
		COMMAND		CFileMan1	NewL		PBASE-F32-Dir-PublicApi-0002-003-NewL_command004
sl@0
   131
		COMMAND		CFileMan1	Delete		PBASE-F32-Dir-PublicApi-0002-003-Delete_command005
sl@0
   132
		COMMAND		RFs1		RmDir		PBASE-F32-Dir-PublicApi-0002-003-RmDir_command006
sl@0
   133
		COMMAND		CFileMan1	~
sl@0
   134
		COMMAND		RFs1		~
sl@0
   135
	END_TEST_BLOCK	
sl@0
   136
END_TESTCASE 			PBASE-F32-Dir-PublicApi-0002
sl@0
   137
sl@0
   138
sl@0
   139
START_TESTCASE 			PBASE-F32-Dir-PublicApi-0003
sl@0
   140
//! @SYMTestCaseID		PBASE-F32-Dir-PublicApi-0003
sl@0
   141
//! @SYMAPI			CDir
sl@0
   142
//! @SYMTestCaseDesc		Function Sort(TUint aEntrySortKey) test, that sorts the array of directory entries by name ascendingly.
sl@0
   143
//!				Uses API elements: Sort(), operator[]().
sl@0
   144
//! @SYMTestActions		1.Create a RFs session and call it's Connect() function.
sl@0
   145
//!				2.Call RFs::GetDir(const TDesC &aName, TUint anEntryAttMask, TUint anEntrySortKey, CDir *&anEntryList), and 
sl@0
   146
//!				  <RAM_DRIVE>:\<RELATIVE_PATH>\Dir\ (containing 4 files: big_line.txt, Test1.txt, Test2.txt, Test3.txt) as first parameter, 
sl@0
   147
//!				  KEntryAttHidden as second parameter, ESortNone as third parameter, CDir pointer as fourth parameter.
sl@0
   148
//!				3.Create new TEntry object.
sl@0
   149
//!				4.Call CDir::Sort() and ESortByName | EAscending as parameter.
sl@0
   150
//!				5.Call operator[]() to verify the sorting result.		
sl@0
   151
//! @SYMTestStatus		Implemented
sl@0
   152
//! @SYMTestPriority		Critical
sl@0
   153
//! @SYMTestExpectedResults	Returns KErrNone.
sl@0
   154
//! @SYMTestType		CIT
sl@0
   155
	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   156
		CREATE_OBJECT	RFs		RFs1
sl@0
   157
		CREATE_OBJECT	CFileMan	CFileMan1
sl@0
   158
		COMMAND		RFs1		new			
sl@0
   159
		COMMAND		RFs1		Connect
sl@0
   160
		COMMAND		RFs1		MkDirAll		PBASE-F32-Dir-PublicApi-0003-001-MkDirAll_command004
sl@0
   161
		COMMAND		CFileMan1	NewL		PBASE-F32-Dir-PublicApi-0003-001-NewL_command005
sl@0
   162
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0003-001-Copy_command006
sl@0
   163
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0003-001-Copy_command007
sl@0
   164
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0003-001-Copy_command008
sl@0
   165
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0003-001-Copy_command009
sl@0
   166
		COMMAND		CFileMan1	~
sl@0
   167
		COMMAND		RFs1		~
sl@0
   168
	END_TEST_BLOCK
sl@0
   169
	START_TEST_BLOCK	2000	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   170
		CREATE_OBJECT	RFs	RFs1
sl@0
   171
		CREATE_OBJECT	TEntry	TEntry1
sl@0
   172
		CREATE_OBJECT	CDir	CDir1
sl@0
   173
		COMMAND		RFs1	new		
sl@0
   174
		COMMAND		RFs1	Connect
sl@0
   175
		COMMAND		RFs1	GetDir		PBASE-F32-Dir-PublicApi-0003-002-GetDir_command005
sl@0
   176
		COMMAND		TEntry1	new
sl@0
   177
		COMMAND		CDir1	Sort		PBASE-F32-Dir-PublicApi-0003-002-Sort_command007
sl@0
   178
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0003-002-index_command008
sl@0
   179
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0003-002-index_command009
sl@0
   180
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0003-002-index_command010
sl@0
   181
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0003-002-index_command011
sl@0
   182
		COMMAND		CDir1	~
sl@0
   183
		COMMAND		TEntry1	~
sl@0
   184
		COMMAND		RFs1	~		
sl@0
   185
	END_TEST_BLOCK
sl@0
   186
	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   187
		CREATE_OBJECT	RFs		RFs1
sl@0
   188
		CREATE_OBJECT	CFileMan	CFileMan1
sl@0
   189
		COMMAND		RFs1		new			
sl@0
   190
		COMMAND		RFs1		Connect
sl@0
   191
		COMMAND		CFileMan1	NewL		PBASE-F32-Dir-PublicApi-0003-003-NewL_command004
sl@0
   192
		COMMAND		CFileMan1	Delete		PBASE-F32-Dir-PublicApi-0003-003-Delete_command005
sl@0
   193
		COMMAND		RFs1		RmDir		PBASE-F32-Dir-PublicApi-0003-003-RmDir_command006
sl@0
   194
		COMMAND		CFileMan1	~
sl@0
   195
		COMMAND		RFs1		~
sl@0
   196
	END_TEST_BLOCK	
sl@0
   197
END_TESTCASE 			PBASE-F32-Dir-PublicApi-0003
sl@0
   198
sl@0
   199
sl@0
   200
START_TESTCASE 			PBASE-F32-Dir-PublicApi-0004
sl@0
   201
//! @SYMTestCaseID		PBASE-F32-Dir-PublicApi-0004
sl@0
   202
//! @SYMAPI			CDir
sl@0
   203
//! @SYMTestCaseDesc		Function Sort(TUint aEntrySortKey) test, that sorts the array of directory entries by extension descendingly.
sl@0
   204
//!				Uses API elements: Sort(), operator[]().
sl@0
   205
//! @SYMTestActions		1.Create a RFs session and call it's Connect() function.
sl@0
   206
//!				2.Call RFs::GetDir(const TDesC &aName, TUint anEntryAttMask, TUint anEntrySortKey, CDir *&anEntryList), and 
sl@0
   207
//!				  <RAM_DRIVE>:\<RELATIVE_PATH>\Dir\ (containing 4 files: big_line.txt, Test1.txt, Test2.txt, Test3.txt) as first parameter, 
sl@0
   208
//!				  KEntryAttHidden as second parameter, ESortNone as third parameter, CDir pointer as fourth parameter.
sl@0
   209
//!				3.Create new TEntry object.
sl@0
   210
//!				4.Call CDir::Sort() and ESortByExt | EDescending as parameter.
sl@0
   211
//!				5.Call operator[]() to verify the sorting result.		
sl@0
   212
//! @SYMTestStatus		Implemented
sl@0
   213
//! @SYMTestPriority		Critical
sl@0
   214
//! @SYMTestExpectedResults	Returns KErrNone.
sl@0
   215
//! @SYMTestType		CIT
sl@0
   216
	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   217
		CREATE_OBJECT	RFs		RFs1
sl@0
   218
		CREATE_OBJECT	CFileMan	CFileMan1
sl@0
   219
		COMMAND		RFs1		new			
sl@0
   220
		COMMAND		RFs1		Connect
sl@0
   221
		COMMAND		RFs1		MkDirAll		PBASE-F32-Dir-PublicApi-0004-001-MkDirAll_command004
sl@0
   222
		COMMAND		CFileMan1	NewL		PBASE-F32-Dir-PublicApi-0004-001-NewL_command005
sl@0
   223
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0004-001-Copy_command006
sl@0
   224
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0004-001-Copy_command007
sl@0
   225
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0004-001-Copy_command008
sl@0
   226
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0004-001-Copy_command009
sl@0
   227
		COMMAND		CFileMan1	~
sl@0
   228
		COMMAND		RFs1		~
sl@0
   229
	END_TEST_BLOCK
sl@0
   230
	START_TEST_BLOCK	2000	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   231
		CREATE_OBJECT	RFs	RFs1
sl@0
   232
		CREATE_OBJECT	TEntry	TEntry1
sl@0
   233
		CREATE_OBJECT	CDir	CDir1
sl@0
   234
		COMMAND		RFs1	new		
sl@0
   235
		COMMAND		RFs1	Connect
sl@0
   236
		COMMAND		RFs1	GetDir		PBASE-F32-Dir-PublicApi-0004-002-GetDir_command005
sl@0
   237
		COMMAND		TEntry1	new
sl@0
   238
		COMMAND		CDir1	Sort		PBASE-F32-Dir-PublicApi-0004-002-Sort_command007
sl@0
   239
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0004-002-index_command008
sl@0
   240
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0004-002-index_command009
sl@0
   241
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0004-002-index_command010
sl@0
   242
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0004-002-index_command011
sl@0
   243
		COMMAND		CDir1	~
sl@0
   244
		COMMAND		TEntry1	~
sl@0
   245
		COMMAND		RFs1	~		
sl@0
   246
	END_TEST_BLOCK
sl@0
   247
	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   248
		CREATE_OBJECT	RFs		RFs1
sl@0
   249
		CREATE_OBJECT	CFileMan	CFileMan1
sl@0
   250
		COMMAND		RFs1		new			
sl@0
   251
		COMMAND		RFs1		Connect
sl@0
   252
		COMMAND		CFileMan1	NewL		PBASE-F32-Dir-PublicApi-0004-003-NewL_command004
sl@0
   253
		COMMAND		CFileMan1	Delete		PBASE-F32-Dir-PublicApi-0004-003-Delete_command005
sl@0
   254
		COMMAND		RFs1		RmDir		PBASE-F32-Dir-PublicApi-0004-003-RmDir_command006
sl@0
   255
		COMMAND		CFileMan1	~
sl@0
   256
		COMMAND		RFs1		~
sl@0
   257
	END_TEST_BLOCK
sl@0
   258
END_TESTCASE 			PBASE-F32-Dir-PublicApi-0004
sl@0
   259
sl@0
   260
sl@0
   261
START_TESTCASE 			PBASE-F32-Dir-PublicApi-0005
sl@0
   262
//! @SYMTestCaseID		PBASE-F32-Dir-PublicApi-0005
sl@0
   263
//! @SYMAPI			CDir
sl@0
   264
//! @SYMTestCaseDesc		Function Sort(TUint aEntrySortKey) test, that sorts the array of directory entries by UID.
sl@0
   265
//!				Uses API elements: Sort(), operator[]().
sl@0
   266
//! @SYMTestActions		1.Create a RFs session and call it's Connect() function.
sl@0
   267
//!				2.Call RFs::GetDir(const TDesC &aName, TUint anEntryAttMask, TUint anEntrySortKey, CDir *&anEntryList), and 
sl@0
   268
//!				  <RAM_DRIVE>:\<RELATIVE_PATH>\Dir\ (containing 4 files: big_line.txt, Test1.txt, Test2.txt, Test3.txt) as first parameter, 
sl@0
   269
//!				  KEntryAttHidden as second parameter, ESortNone as third parameter, CDir pointer as fourth parameter.
sl@0
   270
//!				3.Create new TEntry object.
sl@0
   271
//!				4.Call CDir::Sort() and ESortByUid as parameter.
sl@0
   272
//!				5.Call operator[]() to verify the sorting result.		
sl@0
   273
//! @SYMTestStatus		Implemented
sl@0
   274
//! @SYMTestPriority		Critical
sl@0
   275
//! @SYMTestExpectedResults	Returns KErrNone.
sl@0
   276
//! @SYMTestType		CIT
sl@0
   277
	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   278
		CREATE_OBJECT	RFs		RFs1
sl@0
   279
		CREATE_OBJECT	CFileMan	CFileMan1
sl@0
   280
		COMMAND		RFs1		new			
sl@0
   281
		COMMAND		RFs1		Connect
sl@0
   282
		COMMAND		RFs1		MkDirAll		PBASE-F32-Dir-PublicApi-0005-001-MkDirAll_command004
sl@0
   283
		COMMAND		CFileMan1	NewL		PBASE-F32-Dir-PublicApi-0005-001-NewL_command005
sl@0
   284
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0005-001-Copy_command006
sl@0
   285
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0005-001-Copy_command007
sl@0
   286
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0005-001-Copy_command008
sl@0
   287
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0005-001-Copy_command009
sl@0
   288
		COMMAND		CFileMan1	~
sl@0
   289
		COMMAND		RFs1		~
sl@0
   290
	END_TEST_BLOCK
sl@0
   291
	START_TEST_BLOCK	2000	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   292
		CREATE_OBJECT	RFs	RFs1
sl@0
   293
		CREATE_OBJECT	TEntry	TEntry1
sl@0
   294
		CREATE_OBJECT	CDir	CDir1
sl@0
   295
		COMMAND		RFs1	new		
sl@0
   296
		COMMAND		RFs1	Connect
sl@0
   297
		COMMAND		RFs1	GetDir		PBASE-F32-Dir-PublicApi-0005-002-GetDir_command005
sl@0
   298
		COMMAND		TEntry1	new
sl@0
   299
		COMMAND		CDir1	Sort		PBASE-F32-Dir-PublicApi-0005-002-Sort_command007
sl@0
   300
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0005-002-index_command008
sl@0
   301
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0005-002-index_command009
sl@0
   302
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0005-002-index_command010
sl@0
   303
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0005-002-index_command011
sl@0
   304
		COMMAND		CDir1	~
sl@0
   305
		COMMAND		TEntry1	~
sl@0
   306
		COMMAND		RFs1	~		
sl@0
   307
	END_TEST_BLOCK
sl@0
   308
	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   309
		CREATE_OBJECT	RFs		RFs1
sl@0
   310
		CREATE_OBJECT	CFileMan	CFileMan1
sl@0
   311
		COMMAND		RFs1		new			
sl@0
   312
		COMMAND		RFs1		Connect
sl@0
   313
		COMMAND		CFileMan1	NewL		PBASE-F32-Dir-PublicApi-0005-003-NewL_command004
sl@0
   314
		COMMAND		CFileMan1	Delete		PBASE-F32-Dir-PublicApi-0005-003-Delete_command005
sl@0
   315
		COMMAND		RFs1		RmDir		PBASE-F32-Dir-PublicApi-0005-003-RmDir_command006
sl@0
   316
		COMMAND		CFileMan1	~
sl@0
   317
		COMMAND		RFs1		~
sl@0
   318
	END_TEST_BLOCK	
sl@0
   319
END_TESTCASE 			PBASE-F32-Dir-PublicApi-0005
sl@0
   320
sl@0
   321
sl@0
   322
START_TESTCASE 			PBASE-F32-Dir-PublicApi-0006
sl@0
   323
//! @SYMTestCaseID		PBASE-F32-Dir-PublicApi-0006
sl@0
   324
//! @SYMAPI			CDir
sl@0
   325
//! @SYMTestCaseDesc		Function Sort(TUint aEntrySortKey) test, that sorts the array of directory entries by file date, placing directories
sl@0
   326
//!				first descendingly.
sl@0
   327
//!				Uses API elements: Sort(), operator[]().
sl@0
   328
//! @SYMTestActions		1.Create a RFs session and call it's Connect() function.
sl@0
   329
//!				2.Make three directories, passing names BBDir, CCDir and AADir as parameters.
sl@0
   330
//!				3.Call RFs::SetModified(const TDesC &aName, const TTime &aTime) to set directories' and files' modified date.
sl@0
   331
//!				4.Call RFs::GetDir(const TDesC &aName, TUint anEntryAttMask, TUint anEntrySortKey, CDir *&anEntryList), and 
sl@0
   332
//!				  <RAM_DRIVE>:\<RELATIVE_PATH>\Dir\ (containing 4 files and 3 folders: big_line.txt, Test1.txt, Test2.txt, Test3.txt, AADir, BBDir,
sl@0
   333
//!				  CCDir) as first parameter, KEntryAttMaskSupported as second parameter,EDirsLast as third parameter, 
sl@0
   334
//!				  CDir pointer as fourth parameter.
sl@0
   335
//!				5.Create new TEntry object.
sl@0
   336
//!				6.Call CDir::Sort() and EDirsFirst | EDirDescending | ESortByDate as parameter.
sl@0
   337
//!				7.Call operator[]() to verify the sorting result.
sl@0
   338
//!				8.Remove previously created directories.		
sl@0
   339
//! @SYMTestStatus		Implemented
sl@0
   340
//! @SYMTestPriority		Critical
sl@0
   341
//! @SYMTestExpectedResults	Returns KErrNone.
sl@0
   342
//! @SYMTestType		CIT
sl@0
   343
	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   344
		CREATE_OBJECT	RFs		RFs1
sl@0
   345
		CREATE_OBJECT	CFileMan	CFileMan1
sl@0
   346
		COMMAND		RFs1		new			
sl@0
   347
		COMMAND		RFs1		Connect
sl@0
   348
		COMMAND		RFs1		MkDirAll		PBASE-F32-Dir-PublicApi-0006-001-MkDirAll_command004
sl@0
   349
		COMMAND		CFileMan1	NewL		PBASE-F32-Dir-PublicApi-0006-001-NewL_command005
sl@0
   350
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0006-001-Copy_command006
sl@0
   351
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0006-001-Copy_command007
sl@0
   352
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0006-001-Copy_command008
sl@0
   353
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0006-001-Copy_command009
sl@0
   354
		COMMAND		CFileMan1	~
sl@0
   355
		COMMAND		RFs1		~
sl@0
   356
	END_TEST_BLOCK
sl@0
   357
	START_TEST_BLOCK	2000	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   358
		CREATE_OBJECT	RFs	RFs1
sl@0
   359
		CREATE_OBJECT	TEntry	TEntry1
sl@0
   360
		CREATE_OBJECT	CDir	CDir1
sl@0
   361
		COMMAND		RFs1	new		
sl@0
   362
		COMMAND		RFs1	Connect
sl@0
   363
		COMMAND		RFs1	MkDirAll		PBASE-F32-Dir-PublicApi-0006-002-MkDirAll_command005
sl@0
   364
		COMMAND		RFs1	MkDirAll		PBASE-F32-Dir-PublicApi-0006-002-MkDirAll_command006
sl@0
   365
		COMMAND		RFs1	MkDirAll		PBASE-F32-Dir-PublicApi-0006-002-MkDirAll_command007
sl@0
   366
		COMMAND		RFs1	SetModified	PBASE-F32-Dir-PublicApi-0006-002-SetModified_command008
sl@0
   367
		COMMAND		RFs1	SetModified	PBASE-F32-Dir-PublicApi-0006-002-SetModified_command009
sl@0
   368
		COMMAND		RFs1	SetModified	PBASE-F32-Dir-PublicApi-0006-002-SetModified_command010
sl@0
   369
		COMMAND		RFs1	SetModified	PBASE-F32-Dir-PublicApi-0006-002-SetModified_command011
sl@0
   370
		COMMAND		RFs1	GetDir		PBASE-F32-Dir-PublicApi-0006-002-GetDir_command012
sl@0
   371
		COMMAND		TEntry1	new
sl@0
   372
		COMMAND		CDir1	Sort		PBASE-F32-Dir-PublicApi-0006-002-Sort_command014
sl@0
   373
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0006-002-index_command015
sl@0
   374
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0006-002-index_command016
sl@0
   375
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0006-002-index_command017
sl@0
   376
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0006-002-index_command018
sl@0
   377
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0006-002-index_command019
sl@0
   378
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0006-002-index_command020
sl@0
   379
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0006-002-index_command021
sl@0
   380
		COMMAND		RFs1	RmDir		PBASE-F32-Dir-PublicApi-0006-002-RmDir_command022
sl@0
   381
		COMMAND		RFs1	RmDir		PBASE-F32-Dir-PublicApi-0006-002-RmDir_command023
sl@0
   382
		COMMAND		RFs1	RmDir		PBASE-F32-Dir-PublicApi-0006-002-RmDir_command024
sl@0
   383
		COMMAND		CDir1	~	
sl@0
   384
		COMMAND		TEntry1	~	
sl@0
   385
		COMMAND		RFs1	~		
sl@0
   386
	END_TEST_BLOCK
sl@0
   387
	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   388
		CREATE_OBJECT	RFs		RFs1
sl@0
   389
		CREATE_OBJECT	CFileMan	CFileMan1
sl@0
   390
		COMMAND		RFs1		new			
sl@0
   391
		COMMAND		RFs1		Connect
sl@0
   392
		COMMAND		CFileMan1	NewL		PBASE-F32-Dir-PublicApi-0006-003-NewL_command004
sl@0
   393
		COMMAND		CFileMan1	Delete		PBASE-F32-Dir-PublicApi-0006-003-Delete_command005
sl@0
   394
		COMMAND		RFs1		RmDir		PBASE-F32-Dir-PublicApi-0006-003-RmDir_command006
sl@0
   395
		COMMAND		CFileMan1	~
sl@0
   396
		COMMAND		RFs1		~
sl@0
   397
	END_TEST_BLOCK	
sl@0
   398
END_TESTCASE 			PBASE-F32-Dir-PublicApi-0006
sl@0
   399
sl@0
   400
sl@0
   401
START_TESTCASE 			PBASE-F32-Dir-PublicApi-0007
sl@0
   402
//! @SYMTestCaseID		PBASE-F32-Dir-PublicApi-0007
sl@0
   403
//! @SYMAPI			CDir
sl@0
   404
//! @SYMTestCaseDesc		Function Sort(TUint aEntrySortKey) test, that sorts the array of directory entries by size, placing directories last.
sl@0
   405
//!				Uses API elements: Sort(), operator[]().
sl@0
   406
//! @SYMTestActions		1.Create a RFs session and call it's Connect() function.
sl@0
   407
//!				2.Make three directories, passing names BBDir, CCDir and AADir as parameters.
sl@0
   408
//!				3.Call RFs::GetDir(const TDesC &aName, TUint anEntryAttMask, TUint anEntrySortKey, CDir *&anEntryList), and 
sl@0
   409
//!				  <RAM_DRIVE>:\<RELATIVE_PATH>\Dir\ (containing 4 files and 3 folders: big_line.txt, Test1.txt, Test2.txt, Test3.txt, AADir, BBDir, 
sl@0
   410
//!				  CCDir) as first parameter, KEntryAttMaskSupported as second parameter, ESortNone as third parameter, CDir pointer 
sl@0
   411
//!				  as fourth parameter.
sl@0
   412
//!				4.Create new TEntry object.
sl@0
   413
//!				5.Call CDir::Sort() and EDirsLast | ESortBySize as parameter.
sl@0
   414
//!				6.Call operator[]() to verify the sorting result.
sl@0
   415
//!				7.Remove previously created directories.		
sl@0
   416
//! @SYMTestStatus		Implemented
sl@0
   417
//! @SYMTestPriority		Critical
sl@0
   418
//! @SYMTestExpectedResults	Returns KErrNone.
sl@0
   419
//! @SYMTestType		CIT
sl@0
   420
	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   421
		CREATE_OBJECT	RFs		RFs1
sl@0
   422
		CREATE_OBJECT	CFileMan	CFileMan1
sl@0
   423
		COMMAND		RFs1		new			
sl@0
   424
		COMMAND		RFs1		Connect
sl@0
   425
		COMMAND		RFs1		MkDirAll		PBASE-F32-Dir-PublicApi-0007-001-MkDirAll_command004
sl@0
   426
		COMMAND		CFileMan1	NewL		PBASE-F32-Dir-PublicApi-0007-001-NewL_command005
sl@0
   427
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0007-001-Copy_command006
sl@0
   428
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0007-001-Copy_command007
sl@0
   429
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0007-001-Copy_command008
sl@0
   430
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0007-001-Copy_command009
sl@0
   431
		COMMAND		CFileMan1	~
sl@0
   432
		COMMAND		RFs1		~
sl@0
   433
	END_TEST_BLOCK
sl@0
   434
	START_TEST_BLOCK	2000	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   435
		CREATE_OBJECT	RFs	RFs1
sl@0
   436
		CREATE_OBJECT	TEntry	TEntry1
sl@0
   437
		CREATE_OBJECT	CDir	CDir1
sl@0
   438
		COMMAND		RFs1	new		
sl@0
   439
		COMMAND		RFs1	Connect
sl@0
   440
		COMMAND		RFs1	MkDirAll		PBASE-F32-Dir-PublicApi-0007-002-MkDirAll_command005
sl@0
   441
		COMMAND		RFs1	MkDirAll		PBASE-F32-Dir-PublicApi-0007-002-MkDirAll_command006
sl@0
   442
		COMMAND		RFs1	MkDirAll		PBASE-F32-Dir-PublicApi-0007-002-MkDirAll_command007
sl@0
   443
		COMMAND		RFs1	GetDir		PBASE-F32-Dir-PublicApi-0007-002-GetDir_command008
sl@0
   444
		COMMAND		TEntry1	new
sl@0
   445
		COMMAND		CDir1	Sort		PBASE-F32-Dir-PublicApi-0007-002-Sort_command010
sl@0
   446
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0007-002-index_command011
sl@0
   447
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0007-002-index_command012
sl@0
   448
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0007-002-index_command013
sl@0
   449
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0007-002-index_command014
sl@0
   450
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0007-002-index_command015
sl@0
   451
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0007-002-index_command016
sl@0
   452
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0007-002-index_command017
sl@0
   453
		COMMAND		RFs1	RmDir		PBASE-F32-Dir-PublicApi-0007-002-RmDir_command018
sl@0
   454
		COMMAND		RFs1	RmDir		PBASE-F32-Dir-PublicApi-0007-002-RmDir_command019
sl@0
   455
		COMMAND		RFs1	RmDir		PBASE-F32-Dir-PublicApi-0007-002-RmDir_command020
sl@0
   456
		COMMAND		CDir1	~
sl@0
   457
		COMMAND		TEntry1	~		
sl@0
   458
		COMMAND		RFs1	~		
sl@0
   459
	END_TEST_BLOCK
sl@0
   460
	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   461
		CREATE_OBJECT	RFs		RFs1
sl@0
   462
		CREATE_OBJECT	CFileMan	CFileMan1
sl@0
   463
		COMMAND		RFs1		new			
sl@0
   464
		COMMAND		RFs1		Connect
sl@0
   465
		COMMAND		CFileMan1	NewL		PBASE-F32-Dir-PublicApi-0007-003-NewL_command004
sl@0
   466
		COMMAND		CFileMan1	Delete		PBASE-F32-Dir-PublicApi-0007-003-Delete_command005
sl@0
   467
		COMMAND		RFs1		RmDir		PBASE-F32-Dir-PublicApi-0007-003-RmDir_command006
sl@0
   468
		COMMAND		CFileMan1	~
sl@0
   469
		COMMAND		RFs1		~
sl@0
   470
	END_TEST_BLOCK
sl@0
   471
END_TESTCASE 			PBASE-F32-Dir-PublicApi-0007
sl@0
   472
sl@0
   473
sl@0
   474
START_TESTCASE 			PBASE-F32-Dir-PublicApi-0008
sl@0
   475
//! @SYMTestCaseID		PBASE-F32-Dir-PublicApi-0008
sl@0
   476
//! @SYMAPI			CDir
sl@0
   477
//! @SYMTestCaseDesc		Function Sort(TUint aEntrySortKey) test, that sorts the array of directory entries by placing directories in the order
sl@0
   478
//!				they occur.
sl@0
   479
//!				Uses API elements: Sort(), operator[]().
sl@0
   480
//! @SYMTestActions		1.Create a RFs session and call it's Connect() function.
sl@0
   481
//!				2.Make three directories, passing names BBDir, CCDir and AADir as parameters.
sl@0
   482
//!				3.Call RFs::GetDir(const TDesC &aName, TUint anEntryAttMask, TUint anEntrySortKey, CDir *&anEntryList, CDir
sl@0
   483
//!				  *&aDirList), and <RAM_DRIVE>:\<RELATIVE_PATH>\Dir\ (containing 3 folders: AADir, BBDir, CCDir) as first parameter, KEntryAttMaskSupported
sl@0
   484
//!				  as second parameter, ESortNone as third parameter, CDir pointer as fourth and fifth parameter.
sl@0
   485
//!				4.Create new TEntry object.
sl@0
   486
//!				5.Call CDir::Sort() and EDirsAnyOrder as parameter.
sl@0
   487
//!				6.Remove previously created directories.		
sl@0
   488
//! @SYMTestStatus		Implemented
sl@0
   489
//! @SYMTestPriority		Critical
sl@0
   490
//! @SYMTestExpectedResults	Returns KErrNone.
sl@0
   491
//! @SYMTestType		CIT
sl@0
   492
	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   493
		CREATE_OBJECT	RFs		RFs1
sl@0
   494
		COMMAND		RFs1		new			
sl@0
   495
		COMMAND		RFs1		Connect
sl@0
   496
		COMMAND		RFs1		MkDirAll		PBASE-F32-Dir-PublicApi-0008-001-MkDirAll_command003
sl@0
   497
		COMMAND		RFs1		~
sl@0
   498
	END_TEST_BLOCK
sl@0
   499
	START_TEST_BLOCK	2000	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   500
		CREATE_OBJECT	RFs	RFs1
sl@0
   501
		CREATE_OBJECT	TEntry	TEntry1
sl@0
   502
		CREATE_OBJECT	CDir	CDir1
sl@0
   503
		CREATE_OBJECT	CDir	CDir2
sl@0
   504
		COMMAND		RFs1	new		
sl@0
   505
		COMMAND		RFs1	Connect
sl@0
   506
		COMMAND		RFs1	MkDirAll		PBASE-F32-Dir-PublicApi-0008-002-MkDirAll_command006
sl@0
   507
		COMMAND		RFs1	MkDirAll		PBASE-F32-Dir-PublicApi-0008-002-MkDirAll_command007
sl@0
   508
		COMMAND		RFs1	MkDirAll		PBASE-F32-Dir-PublicApi-0008-002-MkDirAll_command008
sl@0
   509
		COMMAND		RFs1	GetDir		PBASE-F32-Dir-PublicApi-0008-002-GetDir_command009
sl@0
   510
		COMMAND		TEntry1	new
sl@0
   511
		COMMAND		CDir2	Sort		PBASE-F32-Dir-PublicApi-0008-002-Sort_command011
sl@0
   512
		COMMAND		RFs1	RmDir		PBASE-F32-Dir-PublicApi-0008-002-RmDir_command012
sl@0
   513
		COMMAND		RFs1	RmDir		PBASE-F32-Dir-PublicApi-0008-002-RmDir_command013
sl@0
   514
		COMMAND		RFs1	RmDir		PBASE-F32-Dir-PublicApi-0008-002-RmDir_command014
sl@0
   515
		COMMAND		CDir2	~
sl@0
   516
		COMMAND		CDir1	~
sl@0
   517
		COMMAND		TEntry1	~		
sl@0
   518
		COMMAND		RFs1	~		
sl@0
   519
	END_TEST_BLOCK
sl@0
   520
	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   521
		CREATE_OBJECT	RFs		RFs1
sl@0
   522
		COMMAND		RFs1		new			
sl@0
   523
		COMMAND		RFs1		Connect
sl@0
   524
		COMMAND		RFs1		RmDir		PBASE-F32-Dir-PublicApi-0008-003-RmDir_command003
sl@0
   525
		COMMAND		RFs1		~
sl@0
   526
	END_TEST_BLOCK
sl@0
   527
END_TESTCASE 			PBASE-F32-Dir-PublicApi-0008
sl@0
   528
sl@0
   529
sl@0
   530
START_TESTCASE 			PBASE-F32-Dir-PublicApi-0009
sl@0
   531
//! @SYMTestCaseID		PBASE-F32-Dir-PublicApi-0009
sl@0
   532
//! @SYMAPI			CDir
sl@0
   533
//! @SYMTestCaseDesc		Test that checks that CDir entrylist is initialized correctly. Can be also used 
sl@0
   534
//!				as RFs::GetDir(const TDesC &aName, TUint anEntryAttMask, TUint anEntrySortKey, CDir *&anEntryList, CDir *&aDirList)
sl@0
   535
//!				optional test.
sl@0
   536
//!				Uses API elements: operator[]().
sl@0
   537
//! @SYMTestActions		1.Create a RFs session and call it's Connect() function.
sl@0
   538
//!				2.Call RFs::TInt GetDir(const TDesC &aName, TUint anEntryAttMask, TUint anEntrySortKey, CDir *&anEntryList,
sl@0
   539
//!				  CDir *&aDirList), and <RAM_DRIVE>:\<RELATIVE_PATH>\Dir\ (containing 4 files: big_line.txt, Test1.txt, Test2.txt, Test3.txt) as first
sl@0
   540
//!				  parameter, KEntryAttHidden as second parameter, ESortByName | EAscending as third parameter, first CDir pointer as 
sl@0
   541
//!				  fourth parameter, second CDir pointer as fifth parameter.
sl@0
   542
//!				3.Create new TEntry object.
sl@0
   543
//!				4. Call CDir::Sort() and ESortByName | EAscending as parameter on the anEntryList.
sl@0
   544
//!				5. Call operator[]() on the first CDir object to verify the sorting result.
sl@0
   545
//! @SYMTestStatus		Implemented
sl@0
   546
//! @SYMTestPriority		Critical
sl@0
   547
//! @SYMTestExpectedResults	Returns KErrNone.
sl@0
   548
//! @SYMTestType		CIT
sl@0
   549
	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   550
		CREATE_OBJECT	RFs		RFs1
sl@0
   551
		CREATE_OBJECT	CFileMan	CFileMan1
sl@0
   552
		COMMAND		RFs1		new			
sl@0
   553
		COMMAND		RFs1		Connect
sl@0
   554
		COMMAND		RFs1		MkDirAll		PBASE-F32-Dir-PublicApi-0009-001-MkDirAll_command004
sl@0
   555
		COMMAND		CFileMan1	NewL		PBASE-F32-Dir-PublicApi-0009-001-NewL_command005
sl@0
   556
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0009-001-Copy_command006
sl@0
   557
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0009-001-Copy_command007
sl@0
   558
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0009-001-Copy_command008
sl@0
   559
		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0009-001-Copy_command009
sl@0
   560
		COMMAND		CFileMan1	~
sl@0
   561
		COMMAND		RFs1		~
sl@0
   562
	END_TEST_BLOCK
sl@0
   563
	START_TEST_BLOCK	2000	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   564
		CREATE_OBJECT	RFs	RFs1
sl@0
   565
		CREATE_OBJECT	TEntry	TEntry1
sl@0
   566
		CREATE_OBJECT	CDir	CDir1
sl@0
   567
		CREATE_OBJECT	CDir	CDir2
sl@0
   568
		COMMAND		RFs1	new		
sl@0
   569
		COMMAND		RFs1	Connect
sl@0
   570
		COMMAND		RFs1	GetDir		PBASE-F32-Dir-PublicApi-0009-002-GetDir_command006
sl@0
   571
		COMMAND		TEntry1	new
sl@0
   572
		COMMAND		CDir1	Sort		PBASE-F32-Dir-PublicApi-0009-002-Sort_command008
sl@0
   573
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0009-002-index_command009
sl@0
   574
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0009-002-index_command010
sl@0
   575
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0009-002-index_command011
sl@0
   576
		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0009-002-index_command012
sl@0
   577
		COMMAND		CDir2	~
sl@0
   578
		COMMAND		CDir1	~
sl@0
   579
		COMMAND		TEntry1	~		
sl@0
   580
		COMMAND		RFs1	~		
sl@0
   581
	END_TEST_BLOCK
sl@0
   582
	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   583
		CREATE_OBJECT	RFs		RFs1
sl@0
   584
		CREATE_OBJECT	CFileMan	CFileMan1
sl@0
   585
		COMMAND		RFs1		new			
sl@0
   586
		COMMAND		RFs1		Connect
sl@0
   587
		COMMAND		CFileMan1	NewL		PBASE-F32-Dir-PublicApi-0009-003-NewL_command004
sl@0
   588
		COMMAND		CFileMan1	Delete		PBASE-F32-Dir-PublicApi-0009-003-Delete_command005
sl@0
   589
		COMMAND		RFs1		RmDir		PBASE-F32-Dir-PublicApi-0009-003-RmDir_command006
sl@0
   590
		COMMAND		CFileMan1	~
sl@0
   591
		COMMAND		RFs1		~
sl@0
   592
	END_TEST_BLOCK
sl@0
   593
END_TESTCASE 			PBASE-F32-Dir-PublicApi-0009
sl@0
   594
sl@0
   595
sl@0
   596
START_TESTCASE 			PBASE-F32-Dir-PublicApi-0010
sl@0
   597
//! @SYMTestCaseID		PBASE-F32-Dir-PublicApi-0010
sl@0
   598
//! @SYMAPI			CDir
sl@0
   599
//! @SYMTestCaseDesc		Function Sort(TUint aEntrySortKey) test, that sorts the array of directory entries by placing directories in the order
sl@0
   600
//!				they occur.
sl@0
   601
//!				Uses API elements: Sort(), operator[]().
sl@0
   602
//! @SYMTestActions		1.Create a RFs session and call it's Connect() function.
sl@0
   603
//!				2.Make three directories, passing names BBDir, CCDir and AADir as parameters.
sl@0
   604
//!				3.Call RFs::GetDir(const TDesC &aName, TUint anEntryAttMask, TUint anEntrySortKey, CDir *&anEntryList, CDir
sl@0
   605
//!				  *&aDirList), and <RAM_DRIVE>:\<RELATIVE_PATH>\Dir\ (containing 3 folders: AADir, BBDir, CCDir) as first parameter, KEntryAttMaskSupported
sl@0
   606
//!				  as second parameter, ESortNone as third parameter, CDir pointer as fourth and fifth parameter.
sl@0
   607
//!				4.Create new TEntry object.
sl@0
   608
//!				5.Call CDir::Sort() and EDirDescending|EDirsFirst as parameter.
sl@0
   609
//!				6.Call operator[]() on the second CDir object to verify the sorting result.
sl@0
   610
//!				7.Remove previously created directories.		
sl@0
   611
//! @SYMTestStatus		Implemented
sl@0
   612
//! @SYMTestPriority		Critical
sl@0
   613
//! @SYMTestExpectedResults	Returns KErrNone.
sl@0
   614
//! @SYMTestType		CIT
sl@0
   615
	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   616
		CREATE_OBJECT	RFs		RFs1
sl@0
   617
		COMMAND		RFs1		new			
sl@0
   618
		COMMAND		RFs1		Connect
sl@0
   619
		COMMAND		RFs1		MkDirAll		PBASE-F32-Dir-PublicApi-0010-001-MkDirAll_command003
sl@0
   620
		COMMAND		RFs1		~
sl@0
   621
	END_TEST_BLOCK
sl@0
   622
	START_TEST_BLOCK	2000	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   623
		CREATE_OBJECT	RFs	RFs1
sl@0
   624
		CREATE_OBJECT	TEntry	TEntry1
sl@0
   625
		CREATE_OBJECT	CDir	CDir1
sl@0
   626
		CREATE_OBJECT	CDir	CDir2
sl@0
   627
		COMMAND		RFs1	new		
sl@0
   628
		COMMAND		RFs1	Connect
sl@0
   629
		COMMAND		RFs1	MkDirAll		PBASE-F32-Dir-PublicApi-0010-002-MkDirAll_command006
sl@0
   630
		COMMAND		RFs1	MkDirAll		PBASE-F32-Dir-PublicApi-0010-002-MkDirAll_command007
sl@0
   631
		COMMAND		RFs1	MkDirAll		PBASE-F32-Dir-PublicApi-0010-002-MkDirAll_command008
sl@0
   632
		COMMAND		RFs1	GetDir		PBASE-F32-Dir-PublicApi-0010-002-GetDir_command009
sl@0
   633
		COMMAND		TEntry1	new
sl@0
   634
		COMMAND		CDir2	Sort		PBASE-F32-Dir-PublicApi-0010-002-Sort_command011
sl@0
   635
		COMMAND		CDir2	[]		PBASE-F32-Dir-PublicApi-0010-002-index_command012
sl@0
   636
		COMMAND		CDir2	[]		PBASE-F32-Dir-PublicApi-0010-002-index_command013
sl@0
   637
		COMMAND		CDir2	[]		PBASE-F32-Dir-PublicApi-0010-002-index_command014
sl@0
   638
		COMMAND		RFs1	RmDir		PBASE-F32-Dir-PublicApi-0010-002-RmDir_command015
sl@0
   639
		COMMAND		RFs1	RmDir		PBASE-F32-Dir-PublicApi-0010-002-RmDir_command016
sl@0
   640
		COMMAND		RFs1	RmDir		PBASE-F32-Dir-PublicApi-0010-002-RmDir_command017
sl@0
   641
		COMMAND		CDir2	~
sl@0
   642
		COMMAND		CDir1	~
sl@0
   643
		COMMAND		TEntry1	~		
sl@0
   644
		COMMAND		RFs1	~		
sl@0
   645
	END_TEST_BLOCK
sl@0
   646
	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   647
		CREATE_OBJECT	RFs		RFs1
sl@0
   648
		COMMAND		RFs1		new			
sl@0
   649
		COMMAND		RFs1		Connect
sl@0
   650
		COMMAND		RFs1		RmDir		PBASE-F32-Dir-PublicApi-0010-003-RmDir_command003
sl@0
   651
		COMMAND		RFs1		~
sl@0
   652
	END_TEST_BLOCK
sl@0
   653
END_TESTCASE 			PBASE-F32-Dir-PublicApi-0010
sl@0
   654
sl@0
   655
sl@0
   656
sl@0
   657
sl@0
   658
//////////////////////////////////////////////////////////////////////
sl@0
   659
//////////////////////////////////////////////////////////////////////
sl@0
   660
//////								//////
sl@0
   661
//////		 ///////////////////////////////////		//////
sl@0
   662
//////		 ///				 ///		//////
sl@0
   663
//////		 ///	  NEGATIVE TESTS	 ///		//////
sl@0
   664
//////		 ///				 ///		//////	
sl@0
   665
//////		 ///////////////////////////////////		//////
sl@0
   666
//////								//////
sl@0
   667
//////////////////////////////////////////////////////////////////////
sl@0
   668
//////////////////////////////////////////////////////////////////////
sl@0
   669
sl@0
   670
sl@0
   671
////////
sl@0
   672
//COUNT
sl@0
   673
////////
sl@0
   674
sl@0
   675
////////////
sl@0
   676
//OPERATOR[]
sl@0
   677
////////////
sl@0
   678
sl@0
   679
//! START_TESTCASE 			PBASE-F32-Dir-PublicApi-0101
sl@0
   680
//! @SYMTestCaseID		PBASE-F32-Dir-PublicApi-0101
sl@0
   681
//! @SYMAPI			CDir
sl@0
   682
//! @SYMTestCaseDesc		operator const TEntry &operator[](TInt anIndex) const negative test that tries to take 50th entry from the array of
sl@0
   683
//!				directory entries.
sl@0
   684
//!				Uses API elements: operator[]().
sl@0
   685
//! @SYMTestActions		1.Create a RFs session and call it's Connect() function.
sl@0
   686
//!				2.Call RFs::GetDir(const TDesC &aName, TUint anEntryAttMask, TUint anEntrySortKey, CDir *&anEntryList), and 
sl@0
   687
//!				  <RAM_DRIVE>:\<RELATIVE_PATH>\Dir\ (containing 1 file: Test1.txt) as first parameter, KEntryAttHidden as second parameter, ESortByName as
sl@0
   688
//!				  third parameter, CDir pointer as fourth parameter.
sl@0
   689
//!				3.Create new TEntry object.
sl@0
   690
//!				4.Call CDir::operator[]() and pass 50 as parameter.		
sl@0
   691
//! @SYMTestStatus		Implemented
sl@0
   692
//! @SYMTestPriority		Critical
sl@0
   693
//! @SYMTestExpectedResults	E32USER-CBase = 21 panic
sl@0
   694
//! @SYMTestType		CIT
sl@0
   695
//! 	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   696
//! 		CREATE_OBJECT	RFs		RFs1
sl@0
   697
//! 		CREATE_OBJECT	CFileMan	CFileMan1
sl@0
   698
//! 		COMMAND		RFs1		new			
sl@0
   699
//! 		COMMAND		RFs1		Connect
sl@0
   700
//! 		COMMAND		RFs1		MkDirAll		PBASE-F32-Dir-PublicApi-0101-001-MkDirAll_command004
sl@0
   701
//! 		COMMAND		CFileMan1	NewL		PBASE-F32-Dir-PublicApi-0101-001-NewL_command005
sl@0
   702
//! 		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0101-001-Copy_command006
sl@0
   703
//! 		COMMAND		CFileMan1	~
sl@0
   704
//! 		COMMAND		RFs1		~
sl@0
   705
//! 	END_TEST_BLOCK
sl@0
   706
//! 	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   707
//! 		CREATE_OBJECT	RFs	RFs1
sl@0
   708
//! 		CREATE_OBJECT	TEntry	TEntry1
sl@0
   709
//! 		CREATE_OBJECT	CDir	CDir1
sl@0
   710
//! 		COMMAND		RFs1	new		
sl@0
   711
//! 		COMMAND		RFs1	Connect		
sl@0
   712
//! 		COMMAND		RFs1	GetDir		PBASE-F32-Dir-PublicApi-0101-002-GetDir_command005
sl@0
   713
//! 		COMMAND		TEntry1	new
sl@0
   714
//! 		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0101-002-index_command007
sl@0
   715
//! 		COMMAND		CDir1	~
sl@0
   716
//! 		COMMAND		TEntry1	~		
sl@0
   717
//! 		COMMAND		RFs1	~		
sl@0
   718
//! 	END_TEST_BLOCK	!PanicCode=21 !PanicString=E32USER-CBase
sl@0
   719
//! 	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   720
//! 		CREATE_OBJECT	RFs		RFs1
sl@0
   721
//! 		CREATE_OBJECT	CFileMan	CFileMan1
sl@0
   722
//! 		COMMAND		RFs1		new			
sl@0
   723
//! 		COMMAND		RFs1		Connect
sl@0
   724
//! 		COMMAND		CFileMan1	NewL		PBASE-F32-Dir-PublicApi-0101-003-NewL_command004
sl@0
   725
//! 		COMMAND		CFileMan1	Delete		PBASE-F32-Dir-PublicApi-0101-003-Delete_command005
sl@0
   726
//! 		COMMAND		RFs1		RmDir		PBASE-F32-Dir-PublicApi-0101-003-RmDir_command006
sl@0
   727
//! 		COMMAND		CFileMan1	~
sl@0
   728
//! 		COMMAND		RFs1		~
sl@0
   729
//! 	END_TEST_BLOCK
sl@0
   730
//! END_TESTCASE 			PBASE-F32-Dir-PublicApi-0101
sl@0
   731
sl@0
   732
sl@0
   733
//! START_TESTCASE 			PBASE-F32-Dir-PublicApi-0102
sl@0
   734
//! @SYMTestCaseID		PBASE-F32-Dir-PublicApi-0102
sl@0
   735
//! @SYMAPI			CDir
sl@0
   736
//! @SYMTestCaseDesc		operator const TEntry &operator[](TInt anIndex) const negative test, that tries to take entry with index -1 from the
sl@0
   737
//!				array of directory entries.
sl@0
   738
//!				Uses API elements: operator[]().
sl@0
   739
//! @SYMTestActions		1.Create a RFs session and call it's Connect() function.
sl@0
   740
//!				2.Call RFs::GetDir(const TDesC &aName, TUint anEntryAttMask, TUint anEntrySortKey, CDir *&anEntryList), and 
sl@0
   741
//!				  <RAM_DRIVE>:\<RELATIVE_PATH>\Dir\ (containing 1 file: Test1.txt) as first parameter, KEntryAttHidden as second parameter, ESortByName as
sl@0
   742
//!				  third parameter, CDir pointer as fourth parameter.
sl@0
   743
//!				3.Create new TEntry object.
sl@0
   744
//!				4.Call CDir::operator[]() and pass -1 as parameter.			
sl@0
   745
//! @SYMTestStatus		Implemented
sl@0
   746
//! @SYMTestPriority		Critical
sl@0
   747
//! @SYMTestExpectedResults	E32USER-CBase = 21 panic
sl@0
   748
//! @SYMTestType		CIT
sl@0
   749
//! 	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   750
//! 		CREATE_OBJECT	RFs		RFs1
sl@0
   751
//! 		CREATE_OBJECT	CFileMan	CFileMan1
sl@0
   752
//! 		COMMAND		RFs1		new			
sl@0
   753
//! 		COMMAND		RFs1		Connect
sl@0
   754
//! 		COMMAND		RFs1		MkDirAll		PBASE-F32-Dir-PublicApi-0102-001-MkDirAll_command004
sl@0
   755
//! 		COMMAND		CFileMan1	NewL		PBASE-F32-Dir-PublicApi-0102-001-NewL_command005
sl@0
   756
//! 		COMMAND		CFileMan1	Copy		PBASE-F32-Dir-PublicApi-0102-001-Copy_command006
sl@0
   757
//! 		COMMAND		CFileMan1	~
sl@0
   758
//! 		COMMAND		RFs1		~
sl@0
   759
//! 	END_TEST_BLOCK
sl@0
   760
//! 	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   761
//! 		CREATE_OBJECT	RFs	RFs1
sl@0
   762
//! 		CREATE_OBJECT	TEntry	TEntry1
sl@0
   763
//! 		CREATE_OBJECT	CDir	CDir1
sl@0
   764
//! 		COMMAND		RFs1	new		
sl@0
   765
//! 		COMMAND		RFs1	Connect		
sl@0
   766
//! 		COMMAND		RFs1	GetDir		PBASE-F32-Dir-PublicApi-0102-002-GetDir_command005
sl@0
   767
//! 		COMMAND		TEntry1	new
sl@0
   768
//! 		COMMAND		CDir1	[]		PBASE-F32-Dir-PublicApi-0102-002-index_command007
sl@0
   769
//! 		COMMAND		CDir1	~
sl@0
   770
//! 		COMMAND		TEntry1	~		
sl@0
   771
//! 		COMMAND		RFs1	~		
sl@0
   772
//! 	END_TEST_BLOCK	!PanicCode=21 !PanicString=E32USER-CBase
sl@0
   773
//! 	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-Dir-PublicApi.ini 
sl@0
   774
//! 		CREATE_OBJECT	RFs		RFs1
sl@0
   775
//! 		CREATE_OBJECT	CFileMan	CFileMan1
sl@0
   776
//! 		COMMAND		RFs1		new			
sl@0
   777
//! 		COMMAND		RFs1		Connect
sl@0
   778
//! 		COMMAND		CFileMan1	NewL		PBASE-F32-Dir-PublicApi-0102-003-NewL_command004
sl@0
   779
//! 		COMMAND		CFileMan1	Delete		PBASE-F32-Dir-PublicApi-0102-003-Delete_command005
sl@0
   780
//! 		COMMAND		RFs1		RmDir		PBASE-F32-Dir-PublicApi-0102-003-RmDir_command006
sl@0
   781
//! 		COMMAND		CFileMan1	~
sl@0
   782
//! 		COMMAND		RFs1		~
sl@0
   783
//! 	END_TEST_BLOCK
sl@0
   784
//! END_TESTCASE 			PBASE-F32-Dir-PublicApi-0102