sl@0: // sl@0: // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: //! @file sl@0: //! @SYMTestSuiteName pbase-f32-sfsrv-publicapi-ram sl@0: //! @SYMScriptTestEnvironment This test script requires a basic ROM. sl@0: //! @SYMScriptAuthor Alvar Udras, Runno Sgirka sl@0: //! @SYMScriptDescription The test script contains API tests for the following functions of RFormat class: sl@0: //! TInt Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount); sl@0: //! void Close(); sl@0: sl@0: LOAD_SUITE t_sfsrv sl@0: DELAY 5000 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-Format-PublicApi-1004 sl@0: //! @SYMTestCaseID PBASE-F32-Format-PublicApi-1004 sl@0: //! @SYMAPI RFormat sl@0: //! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) test. Call Open() with invalid sl@0: //! drive letter value. sl@0: //! Uses API elements: Open(), Close(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Connect the RFs session. sl@0: //! 3. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method, passing the RFs session, sl@0: //! "InvalidDriveLetter", EQuickFormat, aCount as parameters. sl@0: //! 4. Call Close() to close the RFormat instance. sl@0: //! 5. Close RFs session. sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults The Open() method call returns error -28 (KErrBadName). sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-Format-PublicApi.ini sl@0: CREATE_OBJECT RFs rfs1 sl@0: CREATE_OBJECT RFormat format1 sl@0: COMMAND rfs1 new sl@0: COMMAND rfs1 Connect sl@0: COMMAND format1 new sl@0: COMMAND !Error=-28 format1 Open PBASE-F32-Format-PublicApi-1004-001-Open_command05 sl@0: COMMAND format1 Close sl@0: COMMAND format1 ~ sl@0: COMMAND rfs1 Close sl@0: COMMAND rfs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-Format-PublicApi-1004 sl@0: sl@0: START_TESTCASE PBASE-F32-Format-PublicApi-1006 sl@0: //! @SYMTestCaseID PBASE-F32-Format-PublicApi-1006 sl@0: //! @SYMAPI RFormat sl@0: //! @SYMTestCaseDesc Function Close() test. Call Close() without calling Open() first. sl@0: //! Uses API elements: Close(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Connect the RFs session. sl@0: //! 3. Call Close() to close the RFormat instance. sl@0: //! 4. Close RFs session. sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults The Close() method call will complete without errors. sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-Format-PublicApi.ini sl@0: CREATE_OBJECT RFs rfs1 sl@0: CREATE_OBJECT RFormat format1 sl@0: COMMAND rfs1 new sl@0: COMMAND rfs1 Connect sl@0: COMMAND format1 new sl@0: COMMAND format1 Close sl@0: COMMAND format1 ~ sl@0: COMMAND rfs1 Close sl@0: COMMAND rfs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-Format-PublicApi-1006 sl@0: sl@0: START_TESTCASE PBASE-F32-Format-PublicApi-1011 sl@0: //! @SYMTestCaseID PBASE-F32-Format-PublicApi-1011 sl@0: //! @SYMAPI RFormat sl@0: //! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) test. Call Open() with sl@0: //! not mounted drive letter value. sl@0: //! Uses API elements: Open(), Close(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Connect the RFs session. sl@0: //! 3. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method, passing the RFs session, sl@0: //! "NotMountedDriveChar", EQuickFormat, aCount as parameters. sl@0: //! 4. Call Close() to close the RFormat instance. sl@0: //! 5. Close RFs session. sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults The Open() method call returns error -18 (KErrNotReady). sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-Format-PublicApi.ini sl@0: CREATE_OBJECT RFs rfs1 sl@0: CREATE_OBJECT RFormat format1 sl@0: COMMAND rfs1 new sl@0: COMMAND rfs1 Connect sl@0: COMMAND format1 new sl@0: COMMAND !Error=-18 format1 Open PBASE-F32-Format-PublicApi-1011-001-Open_command05 sl@0: COMMAND format1 Close sl@0: COMMAND format1 ~ sl@0: COMMAND rfs1 Close sl@0: COMMAND rfs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-Format-PublicApi-1011