//
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description: 
//
//! @file
//! @SYMTestSuiteName		PBASE-F32-RFS-Drives-PublicApi-REM
//! @SYMScriptTestEnvironment	This test script requires a basic ROM.
//! @SYMScriptAuthor 		Anton Grober
//! @SYMScriptDescription	The test script contains API drives & volumes related tests for RFs functions that perform operations on a removeable RAM drive.

LOAD_SUITE	T_Sfsrv



START_TESTCASE 			PBASE-F32-RFS-PublicApi-1005
//! @SYMTestCaseID		PBASE-F32-RFS-PublicApi-1005
//! @SYMAPI			RFs
//! @SYMAuthor			Anton Grober 
//! @SYMCreationDate		22/08/2006 
//! @SYMTestCaseDesc		GetMediaSerialNumber() passing exisiting drive index as parameter.
//!				Uses API elements: GetMediaSerialNumber()
//! @SYMTestActions		1. Call Connect().
//!				2. Call GetMediaSerialNumber() passing TMediaSerialNumber as first parameter path and some drive which support serial number feature as second parameter .
//!				3. Call Close().
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		Critical
//! @SYMTestExpectedResults	Function  GetMediaSerialNumber() returns KErrNone.
//! @SYMTestType		CIT
	START_TEST_BLOCK	100	T_Sfsrv	\base\PBASE-F32-RFS-Drives-PublicApi-REM.ini 
		CREATE_OBJECT	RFs	RFs1
		COMMAND		RFs1	new
		COMMAND		RFs1	Connect
		COMMAND		RFs1	GetMediaSerialNumber		PBASE-F32-RFS-PublicApi-1005-001-GetMediaSerialNumber_command03
		COMMAND		RFs1	Close
		COMMAND		RFs1	~		
	END_TEST_BLOCK	
END_TESTCASE 			PBASE-F32-RFS-PublicApi-1005


START_TESTCASE			PBASE-F32-RFS-PublicApi-1068
//! @SYMTestCaseID		PBASE-F32-RFS-PublicApi-1068
//! @SYMAPI			RFs
//! @SYMCreationDate		22/08/2006 
//! @SYMTestCaseDesc		ErasePassword() test. Tring to call ErasePassword() in non-locked state(no password and not locked).
//!				Uses API elements: ErasePassword()
//! @SYMTestActions		1. Call Connect().
//!				2. Call ErasePassword() passing MMC-card drive's number.	
//!				3. Call Close().
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		High
//! @SYMTestExpectedResults	Function ErasePassword() returns KErrAccessDenied as drive is not locked.
//! @SYMTestType		CIT
	START_TEST_BLOCK	100	T_Sfsrv	\base\PBASE-F32-RFS-Drives-PublicApi-REM.ini 
		CREATE_OBJECT	RFs	RFs1
		COMMAND			RFs1	new
		COMMAND			RFs1	Connect
		COMMAND	!Error=-21	RFs1	ErasePassword		PBASE-F32-RFS-PublicApi-1068-001-ErasePassword_command03
		COMMAND			RFs1	Close
		COMMAND			RFs1	~		
	END_TEST_BLOCK	
	START_TEST_BLOCK	100	T_Sfsrv	\base\PBASE-F32-RFS-Drives-PublicApi-REM.ini 
		CREATE_OBJECT	RFormat	format
		CREATE_OBJECT	RFs	rfs
		COMMAND		rfs	new
		COMMAND		rfs	Connect
		COMMAND		format	new
		COMMAND		format	Open		PBASE-F32-RFS-PublicApi-1068-002-Open_command05
		COMMAND		format	Next
		COMMAND		format	Close
		COMMAND		format	~
		COMMAND		rfs	Close
		COMMAND		rfs	~
	END_TEST_BLOCK	
	START_TEST_BLOCK	100	T_Sfsrv	\base\PBASE-F32-RFS-Drives-PublicApi-REM.ini 
		CREATE_OBJECT	RFs	rfs
		CREATE_OBJECT	CFileMan	fileMan
		CREATE_OBJECT	RFile	file
		COMMAND		rfs	new
		COMMAND		rfs	Connect
		COMMAND		file	new
		COMMAND		file	Open		PBASE-F32-RFS-PublicApi-1068-003-Open_command05
		COMMAND		fileMan	NewL		PBASE-F32-RFS-PublicApi-1068-003-NewL_command07
		COMMAND		fileMan	Copy		PBASE-F32-RFS-PublicApi-1068-003-Copy_command08
		COMMAND		fileMan	~
		COMMAND		file	Close
		COMMAND		file	~
		COMMAND		rfs	Close
		COMMAND		rfs	~
	END_TEST_BLOCK	
END_TESTCASE			PBASE-F32-RFS-PublicApi-1068


START_TESTCASE			PBASE-F32-RFS-PublicApi-1076
//! @SYMTestCaseID		PBASE-F32-RFS-PublicApi-1076
//! @SYMAPI			RFs
//! @SYMCreationDate		22/08/2006 
//! @SYMTestCaseDesc		UnlockDrive() test. Passing non-locked drive's number as parameter.
//!				Uses API elements: UnlockDrive().
//! @SYMTestActions		1. Call Connect().
//!				2. Call UnlockDrive() passing MMC drive's number and 'test' as password.
//!				3. Call Close().
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		High
//! @SYMTestExpectedResults	Function UnlockDrive() returns KErrAlreadyExists.
//! @SYMTestType		CIT
	START_TEST_BLOCK	100	T_Sfsrv	\base\PBASE-F32-RFS-Drives-PublicApi-REM.ini 
		CREATE_OBJECT	RFs	RFs1
		COMMAND			RFs1	new
		COMMAND			RFs1	Connect
		COMMAND	!Error=-11	RFs1	UnlockDrive		PBASE-F32-RFS-PublicApi-1076-001-UnlockDrive_command03
		COMMAND			RFs1	Close
		COMMAND			RFs1	~
	END_TEST_BLOCK	
END_TESTCASE			PBASE-F32-RFS-PublicApi-1076


START_TESTCASE			PBASE-F32-RFS-PublicApi-1100
//! @SYMTestCaseID		PBASE-F32-RFS-PublicApi-1100
//! @SYMAPI			RFs
//! @SYMCreationDate		26/03/2007
//! @SYMTestCaseDesc		FinaliseDrives() test.
//!				Uses API elements: FinaliseDrives().
//! @SYMTestActions		1. Call Connect().
//!				2. Call FinaliseDrives().
//!				3. Call Close().
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		High
//! @SYMTestExpectedResults	Function FinaliseDrives() returns KErrNone.
//! @SYMTestType		CIT
	START_TEST_BLOCK	100	T_Sfsrv	\base\PBASE-F32-RFS-Drives-PublicApi-REM.ini 
		CREATE_OBJECT	RFs	RFs1
		COMMAND		RFs1	new
		COMMAND		RFs1	Connect
		COMMAND		RFs1	FinaliseDrives
		COMMAND		RFs1	Close
		COMMAND		RFs1	~
	END_TEST_BLOCK	
END_TESTCASE			PBASE-F32-RFS-PublicApi-1100

START_TESTCASE			PBASE-F32-RFS-PublicApi-1073
//! @SYMTestCaseID		PBASE-F32-RFS-PublicApi-1073
//! @SYMAPI			RFs
//! @SYMCreationDate		22/08/2006 
//! @SYMTestCaseDesc		ClearPassword() test. Testing in non-locked state.
//!				Uses API elements: ClearPassword()
//! @SYMTestActions		1. Call Connect().
//!				2. Call ClearPassword() passing MMC-card drive's number and 'test' as password.
//!				3. Call Close().
//! @SYMTestStatus		Implemented
//! @SYMTestPriority		High
//! @SYMTestExpectedResults	Function ClearPassword() returns KErrAccessDenied(-21).
//! @SYMTestType		CIT
	START_TEST_BLOCK	100	T_Sfsrv	\base\PBASE-F32-RFS-Drives-PublicApi-REM.ini 
		CREATE_OBJECT	RFs	RFs1
		COMMAND			RFs1	new
		COMMAND			RFs1	Connect
		COMMAND	!Error=-21	RFs1	ClearPassword		PBASE-F32-RFS-PublicApi-1073-001-ClearPassword_command03
		COMMAND			RFs1	Close
		COMMAND			RFs1	~		
	END_TEST_BLOCK
END_TESTCASE 			PBASE-F32-RFS-PublicApi-1073


