baseapitest/basesvs/validation/f32/sfsrv/scripts/PBASE-F32-RFS-PublicApi-ROM.script
//
// 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-Mounts-PublicApi-ROM
//! @SYMScriptTestEnvironment This test script requires a basic ROM.
//! @SYMScriptAuthor Oleg Kuznetsov
//! @SYMScriptDescription The test script contains API tests for the functions listed in the description of PBASE-F32-RFS-Mounts-PublicApi.script
//! file that perform operations on a ROM.
LOAD_SUITE T_Sfsrv
START_TESTCASE PBASE-F32-RFS-PublicApi-0007
//! @SYMTestCaseID PBASE-F32-RFS-PublicApi-0007
//! @SYMAPI RFs
//! @SYMTestCaseDesc Function FileSystemName() test with ROM Drive.
//! Uses API elements: FileSystemName().
//! @SYMTestActions 1. Call Connect() method.
//! 2. Call FileSystemName() passing the ROM drive number as argument. Check that aName parameter is set to "Win32" under WINSCW and to "rofs" under ARMv5.
//! 3. Call Close() method.
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults FileSystemName() returns KErrNone and the real name of the file system through the aName output argument.
//! @SYMTestType CIT
START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-PublicApi-ROM.ini
CREATE_OBJECT RFs RFs1
COMMAND RFs1 new
COMMAND RFs1 Connect
COMMAND RFs1 FileSystemName PBASE-F32-RFS-PublicApi-0007-001-FileSystemName_command03
COMMAND RFs1 Close
COMMAND RFs1 ~
END_TEST_BLOCK
END_TESTCASE PBASE-F32-RFS-PublicApi-0007
START_TESTCASE PBASE-F32-RFS-PublicApi-1006
//! @SYMTestCaseID PBASE-F32-RFS-PublicApi-1006
//! @SYMAPI RFs
//! @SYMAuthor Anton Grober
//! @SYMCreationDate 22/08/2006
//! @SYMTestCaseDesc IsValidDrive() passing a value between 0 and 26 as parameter.
//! Uses API elements: IsValidDrive().
//! @SYMTestActions 1. Call IsValidDrive() passing some mounted drive as a parameter(in this particular case it's tested with ROM-Drive's index as parameter).
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults Function IsValidDrive() returns ETrue.
//! @SYMTestType CIT
START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-PublicApi-ROM.ini
CREATE_OBJECT RFs RFs1
COMMAND RFs1 new
COMMAND RFs1 IsValidDrive PBASE-F32-RFS-PublicApi-1006-001-IsValidDrive_command02
COMMAND RFs1 ~
END_TEST_BLOCK
END_TESTCASE PBASE-F32-RFS-PublicApi-1006
START_TESTCASE PBASE-F32-RFS-PublicApi-1016
//! @SYMTestCaseID PBASE-F32-RFS-PublicApi-1016
//! @SYMAPI RFs
//! @SYMAuthor Anton Golovko
//! @SYMCreationDate 2/10/2006
//! @SYMTestCaseDesc Drive() function test. Passing exisiting drive index as parameter.
//! Uses API elements: Drive()
//! @SYMTestActions 1. Call Connect().
//! 2. Call Drive() passing TDriveInfo reference as first parameter and ROM-drive as second parameter.
//! 3. Call Close().
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults Function returns KErrNone and iType field of TDriveInfo equals EMediaRom.
//! @SYMTestType CIT
START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-PublicApi-ROM.ini
CREATE_OBJECT RFs RFs1
COMMAND RFs1 new
COMMAND RFs1 Connect
COMMAND RFs1 Drive PBASE-F32-RFS-PublicApi-1016-001-Drive_command03
COMMAND RFs1 Close
COMMAND RFs1 ~
END_TEST_BLOCK
END_TESTCASE PBASE-F32-RFS-PublicApi-1016
START_TESTCASE PBASE-F32-RFS-PublicApi-1040
//! @SYMTestCaseID PBASE-F32-RFS-PublicApi-1040
//! @SYMAPI RFs
//! @SYMAuthor Anton Grober
//! @SYMCreationDate 02/10/2006
//! @SYMTestCaseDesc LockDrive() function test. Passing ROM drive index as parameter.
//! Uses API elements: LockDrive().
//! @SYMTestActions 1. Call Connect().
//! 2. Call LockDrive() passing ROM drive's number.
//! 3. Call Close().
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults Function LockDrive() returns KErrNotSupported.
//! @SYMTestType CIT
START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-PublicApi-ROM.ini
CREATE_OBJECT RFs RFs1
COMMAND RFs1 new
COMMAND RFs1 Connect
COMMAND !Error=-5 RFs1 LockDrive PBASE-F32-RFS-PublicApi-1040-001-LockDrive_command03
COMMAND RFs1 Close
COMMAND RFs1 ~
END_TEST_BLOCK
END_TESTCASE PBASE-F32-RFS-PublicApi-1040
START_TESTCASE PBASE-F32-RFS-PublicApi-1042
//! @SYMTestCaseID PBASE-F32-RFS-PublicApi-1042
//! @SYMAPI RFs
//! @SYMAuthor Anton Grober
//! @SYMCreationDate 02/10/2006
//! @SYMTestCaseDesc ReserveDriveSpace() function test. Passing non-writeable drive number as parameter.
//! Uses API elements: ReserveDriveSpace().
//! @SYMTestActions 1. Call Connect().
//! 2. Call ReserveDriveSpace() passing non-writeable drives number as drive number parameter.
//! 3. Call Close().
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults Function ReserveDriveSpace() returns KErrDiskFull.
//! @SYMTestType CIT
START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-PublicApi-ROM.ini
CREATE_OBJECT RFs RFs1
COMMAND RFs1 new
COMMAND RFs1 Connect
COMMAND !Error=-26 RFs1 ReserveDriveSpace PBASE-F32-RFS-PublicApi-1042-001-ReserveDriveSpace_command03
COMMAND RFs1 Close
COMMAND RFs1 ~
END_TEST_BLOCK
END_TESTCASE PBASE-F32-RFS-PublicApi-1042
START_TESTCASE PBASE-F32-RFS-PublicApi-1060
//! @SYMTestCaseID PBASE-F32-RFS-PublicApi-1060
//! @SYMAPI RFs
//! @SYMAuthor Anton Grober
//! @SYMCreationDate 24/01/2007
//! @SYMTestCaseDesc Subst() test passing a mounted drive as paramater.
//! Uses API elements: Subst().
//! @SYMTestActions 1. Call Connect().
//! 2. Call Subst() passing ROM-drive index and some path as second parameter.
//! 3. Call Close().
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults Function Subst() returns empty string through reference.
//! @SYMTestType CIT
START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-PublicApi-ROM.ini
CREATE_OBJECT RFs RFs1
COMMAND RFs1 new
COMMAND RFs1 Connect
COMMAND RFs1 Subst PBASE-F32-RFS-PublicApi-1060-001-Subst_command03
COMMAND RFs1 Close
COMMAND RFs1 ~
END_TEST_BLOCK
END_TESTCASE PBASE-F32-RFS-PublicApi-1060
START_TESTCASE PBASE-F32-RFS-PublicApi-1066
//! @SYMTestCaseID PBASE-F32-RFS-PublicApi-1066
//! @SYMAPI RFs
//! @SYMCreationDate 22/08/2006
//! @SYMTestCaseDesc ErasePassword() test. Passing drive's number which doesn't support locking.
//! Uses API elements: ErasePassword()
//! @SYMTestActions 1. Call Connect().
//! 2. Call ErasePassword() passing some drive's number which doesn't supported locking.
//! 3. Call Close().
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults Function ErasePassword() returns KErrNotSupported.
//! @SYMTestType CIT
START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-PublicApi-ROM.ini
CREATE_OBJECT RFs RFs1
COMMAND RFs1 new
COMMAND RFs1 Connect
COMMAND !Error=-5 RFs1 ErasePassword PBASE-F32-RFS-PublicApi-1066-001-ErasePassword_command03
COMMAND RFs1 Close
COMMAND RFs1 ~
END_TEST_BLOCK
END_TESTCASE PBASE-F32-RFS-PublicApi-1066
START_TESTCASE PBASE-F32-RFS-PublicApi-1071
//! @SYMTestCaseID PBASE-F32-RFS-PublicApi-1071
//! @SYMAPI RFs
//! @SYMCreationDate 22/08/2006
//! @SYMTestCaseDesc ClearPassword() test.
//! Uses API elements: ClearPassword()
//! @SYMTestActions 1. Call Connect().
//! 2. Call ClearPassword() passing some drive's number which doesn't supported locking.
//! 3. Call Close().
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults Function ClearPassword() returns KErrNotSupported.
//! @SYMTestType CIT
START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-PublicApi-ROM.ini
CREATE_OBJECT RFs RFs1
COMMAND RFs1 new
COMMAND RFs1 Connect
COMMAND !Error=-5 RFs1 ClearPassword PBASE-F32-RFS-PublicApi-1071-001-ClearPassword_command03
COMMAND RFs1 Close
COMMAND RFs1 ~
END_TEST_BLOCK
END_TESTCASE PBASE-F32-RFS-PublicApi-1071
START_TESTCASE PBASE-F32-RFS-PublicApi-1077
//! @SYMTestCaseID PBASE-F32-RFS-PublicApi-1077
//! @SYMAPI RFs
//! @SYMCreationDate 22/08/2006
//! @SYMTestCaseDesc UnlockDrive() test. Testing with drive doesn't support locking.
//! Uses API elements: UnlockDrive()
//! @SYMTestActions 1. Call Connect().
//! 2. Call UnlockDrive() passing some drive's number which doesn't supported locking and 'test' as password.
//! 3. Call Close().
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults Function UnlockDrive() returns KErrNotSupported.
//! @SYMTestType CIT
START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-PublicApi-ROM.ini
CREATE_OBJECT RFs RFs1
COMMAND RFs1 new
COMMAND RFs1 Connect
COMMAND !Error=-5 RFs1 UnlockDrive PBASE-F32-RFS-PublicApi-1077-001-UnlockDrive_command03
COMMAND RFs1 Close
COMMAND RFs1 ~
END_TEST_BLOCK
END_TESTCASE PBASE-F32-RFS-PublicApi-1077
START_TESTCASE PBASE-F32-RFS-PublicApi-1090
//! @SYMTestCaseID PBASE-F32-RFS-PublicApi-1090
//! @SYMAPI RFs
//! @SYMAuthor Anton Grober
//! @SYMCreationDate 8/03/2007
//! @SYMTestCaseDesc SetSubst() functions test. Passing ROM drive index as second parameter and existing path to folder as second parameter.
//! Uses API elements: SetSubst().
//! @SYMTestActions 1. Call Connect().
//! 2. Call SetSubst() passing "ROMDriveTestPath:\base\" as a first parameter and non-mounted valid drive's number as a drive number.
//! 3. Check that function returned KErrNone.
//! 4. Call SetSubst() passing ""(empty descriptor) as a first parameter and non-mounted valid drive's number as a drive number. This will unsubst the substed.
//! 5. Call Close().
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults Function SetSubst() returns KErrNone.
//! @SYMTestType CIT
START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-PublicApi-ROM.ini
CREATE_OBJECT RFs RFs1
COMMAND RFs1 new
COMMAND RFs1 Connect
COMMAND RFs1 SetSubst PBASE-F32-RFS-PublicApi-1090-001-SetSubst_command03
COMMAND RFs1 SetSubst PBASE-F32-RFS-PublicApi-1090-001-SetSubst_command04
COMMAND RFs1 Close
COMMAND RFs1 ~
END_TEST_BLOCK
END_TESTCASE PBASE-F32-RFS-PublicApi-1090
START_TESTCASE PBASE-F32-RFS-PublicApi-3012
//! @SYMTestCaseID PBASE-F32-RFS-PublicApi-3012
//! @SYMAPI RFs
//! @SYMTestCaseDesc Function IsRomAddress() test.
//! Uses API elements: IsFileInRom(), IsRomAddress().
//! @SYMTestActions 1. Call Connect().
//! 2. Call IsFileInRom(), get address of "<ROMDriveChar>:\base\T_Sfsrv\test_rom.txt"
//! 3. Call IsRomAddress(), pass address that was got by IsFileInRom as parameter and check that file in rom.
//! 4. Call Close().
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults File is located in rom.
//! @SYMTestType CIT
START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-PublicApi-ROM.ini
CREATE_OBJECT RFs RFs1
COMMAND RFs1 new
COMMAND RFs1 Connect
COMMAND RFs1 IsFileInRom PBASE-F32-RFS-PublicApi-3012-001-IsFileInRom_command03
COMMAND RFs1 IsRomAddress PBASE-F32-RFS-PublicApi-3012-001-IsRomAddress_command04
COMMAND RFs1 Close
COMMAND RFs1 ~
END_TEST_BLOCK
END_TESTCASE PBASE-F32-RFS-PublicApi-3012
START_TESTCASE PBASE-F32-RFS-PublicApi-0019
//! @SYMTestCaseID PBASE-F32-RFS-PublicApi-0019
//! @SYMAPI RFs
//! @SYMTestCaseDesc Function FileSystemSubType() test with ROM drive.
//! Uses API elements: FileSystemSubType().
//! @SYMTestActions 1. Call Connect() method.
//! 2. Call FileSystemSubType() passing the ROM drive number as argument. Check that aName parameter is set to "Win32" under WINSCW and to "Rom" under ARMv5.
//! 3. Call Close() method.
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults FileSystemSubType() returns KErrNone and the real sub type name of the file system through the aName output argument.
//! @SYMTestType CIT
START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-PublicApi-ROM.ini
CREATE_OBJECT RFs RFs1
COMMAND RFs1 new
COMMAND RFs1 Connect
COMMAND RFs1 FileSystemSubType PBASE-F32-RFS-PublicApi-0019-001-FileSystemSubType_command03
COMMAND RFs1 Close
COMMAND RFs1 ~
END_TEST_BLOCK
END_TESTCASE PBASE-F32-RFS-PublicApi-0019
START_TESTCASE PBASE-F32-RFS-PublicApi-3016
//! @SYMTestCaseID PBASE-F32-RFS-PublicApi-3016
//! @SYMAPI RFs
//! @SYMTestCaseDesc Function InitialisePropertiesFile() test.
//! Uses API elements: InitialisePropertiesFile().
//! @SYMTestActions 1. Call Connect().
//! 2. Call InitialisePropertiesFile() and pass "<ROMDriveChar>:\base\T_Sfsrv\test_rom.txt" as argument.
//! 3. Call Close().
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults KErrPermissionDenied, because can only be called from the ESTART process.
//! @SYMTestType CIT
START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-PublicApi-ROM.ini
CREATE_OBJECT RFs RFs1
COMMAND RFs1 new
COMMAND RFs1 Connect
COMMAND !Error=-46 RFs1 InitialisePropertiesFile PBASE-F32-RFS-PublicApi-3016-001-InitialisePropertiesFile_command03
COMMAND RFs1 Close
COMMAND RFs1 ~
END_TEST_BLOCK
END_TESTCASE PBASE-F32-RFS-PublicApi-3016