baseapitest/basesvs/validation/f32/sfsrv/scripts/PBASE-F32-RawDisk-PublicApi-RAM.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-sfsrv-publicapi-ram
//! @SYMScriptTestEnvironment This test script requires a basic ROM.
//! @SYMScriptAuthor Alvar Udras, Runno Sgirka
//! @SYMScriptDescription The test script contains API tests for the following functions of RRawDisk class:
//! TInt Open(RFs &aFs, TInt aDrive);
//! void Close();
LOAD_SUITE t_sfsrv
DELAY 5000
START_TESTCASE PBASE-F32-RawDisk-PublicApi-1003
//! @SYMTestCaseID PBASE-F32-RawDisk-PublicApi-1003
//! @SYMAPI RRawDisk
//! @SYMTestCaseDesc Function Open() test. Open a disk channel, passing an invalid drive letter value.
//! Uses API elements: Open(), Close().
//! @SYMTestActions 1. Create a RFs session.
//! 2. Connect the RFs session.
//! 3. call Open(RFs &aFs, TInt aDrive) method to open a direct access channel to disk, passing an fileserver session,
//! -1 as parameters.
//! 4. Call Close() method to close the channel.
//! 5. Close the RFs session.
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults The Open() method call returns error -6 (KErrArgument).
//! @SYMTestType CIT
START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-RawDisk-PublicApi.ini
CREATE_OBJECT RFs rfs1
CREATE_OBJECT RRawDisk rawdisk1
COMMAND rfs1 new
COMMAND rfs1 Connect
COMMAND rawdisk1 new
COMMAND !Error=-6 rawdisk1 Open PBASE-F32-RawDisk-PublicApi-1003-001-Open_command05
COMMAND rawdisk1 Close
COMMAND rawdisk1 ~
COMMAND rfs1 Close
COMMAND rfs1 ~
END_TEST_BLOCK
END_TESTCASE PBASE-F32-RawDisk-PublicApi-1003
START_TESTCASE PBASE-F32-RawDisk-PublicApi-1004
//! @SYMTestCaseID PBASE-F32-RawDisk-PublicApi-1004
//! @SYMAPI RRawDisk
//! @SYMTestCaseDesc Function Close() test. Call Close() without opening a disk channel first.
//! Uses API elements: Close().
//! @SYMTestActions 1. Create a RFs session.
//! 2. Connect the RFs session.
//! 3. Call Close() method to close the channel.
//! 4. Close the RFs session.
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults The Close() method call is completed without errors.
//! @SYMTestType CIT
START_TEST_BLOCK 100 t_sfsrv \base\PBASE-F32-RawDisk-PublicApi.ini
CREATE_OBJECT RFs rfs1
CREATE_OBJECT RRawDisk rawdisk1
COMMAND rfs1 new
COMMAND rfs1 Connect
COMMAND rawdisk1 new
COMMAND rawdisk1 Close
COMMAND rawdisk1 ~
COMMAND rfs1 Close
COMMAND rfs1 ~
END_TEST_BLOCK
END_TESTCASE PBASE-F32-RawDisk-PublicApi-1004