baseapitest/basesvs/validation/f32/sfsrv/scripts/PBASE-F32-RFS-Files-PublicApi-ANY.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 BASE-F32-RFS-Files-PublicApi-ANY
//! @SYMScriptTestEnvironment This test script requires a basic ROM.
//! @SYMScriptAuthor Sergei Tveritin
//! @SYMScriptDescription The test script contains API files & directories related tests for RFs functions that don't depend on any special type of test drive.
LOAD_SUITE T_Sfsrv
START_TESTCASE PBASE-F32-RFS-PublicApi-2030
//! @SYMTestCaseID PBASE-F32-RFS-PublicApi-2030
//! @SYMAPI RFs
//! @SYMCreationDate 5/10/2006
//! @SYMTestCaseDesc Function Parse(const TDesC &aName, TParse &aParse) test where name of parse is empty.
//! Uses API elements: Parse().
//! @SYMTestActions 1. Call Connect() method.
//! 2. Call Parse() and pass parameter "NULL" as name of parse.
//! 3. Call Close() method.
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults Function Parse() return KErrNone.
//! @SYMTestType CIT
START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-Files-PublicApi-ANY.ini
CREATE_OBJECT RFs RFs1
COMMAND RFs1 new
COMMAND RFs1 Connect
COMMAND RFs1 Parse PBASE-F32-RFS-PublicApi-2030-001-Parse_command03
COMMAND RFs1 Close
COMMAND RFs1 ~
END_TEST_BLOCK
END_TESTCASE PBASE-F32-RFS-PublicApi-2030
START_TESTCASE PBASE-F32-RFS-PublicApi-2032
//! @SYMTestCaseID PBASE-F32-RFS-PublicApi-2032
//! @SYMAPI RFs
//! @SYMCreationDate 5/10/2006
//! @SYMTestCaseDesc Function Parse(const TDesC &aName, const TDesC &aRelated, TParse &aParse) test where related name of parse is invalid.
//! Uses API elements: Parse().
//! @SYMTestActions 1. Call Connect() method.
//! 2. Call Parse() and pass parameter "\<>:"/|" as related.
//! 3. Call Close() method.
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults Function Parse() return KErrNone.
//! @SYMTestType CIT
START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-Files-PublicApi-ANY.ini
CREATE_OBJECT RFs RFs1
COMMAND RFs1 new
COMMAND RFs1 Connect
COMMAND RFs1 Parse PBASE-F32-RFS-PublicApi-2032-001-Parse_command03
COMMAND RFs1 Close
COMMAND RFs1 ~
END_TEST_BLOCK
END_TESTCASE PBASE-F32-RFS-PublicApi-2032
START_TESTCASE PBASE-F32-RFS-PublicApi-2033
//! @SYMTestCaseID PBASE-F32-RFS-PublicApi-2033
//! @SYMAPI RFs
//! @SYMCreationDate 5/10/2006
//! @SYMTestCaseDesc Function Parse(const TDesC &aName, TParse &aParse, TParse &aParse) test where name of parse is empty.
//! Uses API elements: Parse().
//! @SYMTestActions 1. Call Connect() method.
//! 2. Call Parse() and pass parameter "NULL" as name of parse.
//! 3. Call Close() method.
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults Function Parse() return KErrNone.
//! @SYMTestType CIT
START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-Files-PublicApi-ANY.ini
CREATE_OBJECT RFs RFs1
COMMAND RFs1 new
COMMAND RFs1 Connect
COMMAND RFs1 Parse PBASE-F32-RFS-PublicApi-2033-001-Parse_command03
COMMAND RFs1 Close
COMMAND RFs1 ~
END_TEST_BLOCK
END_TESTCASE PBASE-F32-RFS-PublicApi-2033
///////////////////////////////
//
// ISVALIDNAME (const TDesC &aFileName, TText &aBadChar)
//
///////////////////////////////
START_TESTCASE PBASE-F32-RFS-PublicApi-2100
//! @SYMTestCaseID PBASE-F32-RFS-PublicApi-2100
//! @SYMAPI RFs
//! @SYMCreationDate 5/10/2006
//! @SYMTestCaseDesc Function IsValidName(const TDesC &aFileName, TText &aBadChar) test where name is invalid.
//! Uses API elements: IsValidName().
//! @SYMTestActions 1. Call Connect() method.
//! 2. Call IsValidName() and pass parameter "test<>:"/|.txt" as name of file and check that the result is FALSE.
//! 3. Call Close() method.
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults Function IsValidName() return FALSE.
//! @SYMTestType CIT
START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-Files-PublicApi-ANY.ini
CREATE_OBJECT RFs RFs1
COMMAND RFs1 new
COMMAND RFs1 Connect
COMMAND RFs1 IsValidName PBASE-F32-RFS-PublicApi-2100-001-IsValidName_command03
COMMAND RFs1 Close
COMMAND RFs1 ~
END_TEST_BLOCK
END_TESTCASE PBASE-F32-RFS-PublicApi-2100
///////////////////////////////
//
// SETSESSIONTOPRIVATE
//
///////////////////////////////
START_TESTCASE PBASE-F32-RFS-PublicApi-2101
//! @SYMTestCaseID PBASE-F32-RFS-PublicApi-2101
//! @SYMAPI RFs
//! @SYMCreationDate 5/10/2006
//! @SYMTestCaseDesc Function SetSessionToPrivate() test where drive is negative.
//! Uses API elements: SetSessionToPrivate().
//! @SYMTestActions 1. Call Connect() method.
//! 2. Call SetSessionToPrivate() and pass parameter "-12345" as driver.
//! 3. Call NotifyChange with a wildcard drive letter
//! 3. Call Close() method.
//! @SYMTestStatus Implemented
//! @SYMTestPriority Critical
//! @SYMTestExpectedResults Function NotifyChange() return KErrArgument.
//! @SYMTestType CIT
START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-Files-PublicApi-ANY.ini
CREATE_OBJECT RFs RFs1
COMMAND RFs1 new
COMMAND RFs1 Connect
COMMAND RFs1 SetSessionToPrivate PBASE-F32-RFS-PublicApi-2101-001-SetSessionToPrivate_command03
COMMAND !AsyncError=-6 RFs1 NotifyChange PBASE-F32-RFS-PublicApi-2101-001-NotifyChange_command04
OUTSTANDING
COMMAND RFs1 Close
COMMAND RFs1 ~
END_TEST_BLOCK
END_TESTCASE PBASE-F32-RFS-PublicApi-2101
///////////////////////////////
//
// CREATEPRIVATEPATH
//
///////////////////////////////
START_TESTCASE PBASE-F32-RFS-PublicApi-2103
//! @SYMTestCaseID PBASE-F32-RFS-PublicApi-2103
//! @SYMAPI RFs
//! @SYMCreationDate 5/10/2006
//! @SYMTestCaseDesc Function CreatePrivatePath() negative test where drive is negative.
//! Uses API elements: CreatePrivatePath().
//! @SYMTestActions 1. Call Connect() method.
//! 2. Call CreatePrivatePath() and pass parameter "-12345" as driver.
//! 3. Call Close() method.
//! @SYMTestStatus Implemented
//! @SYMTestPriority High
//! @SYMTestExpectedResults Function CreatePrivatePath() return KErrBadName.
//! @SYMTestType CIT
START_TEST_BLOCK 100 T_Sfsrv \base\PBASE-F32-RFS-Files-PublicApi-ANY.ini
CREATE_OBJECT RFs RFs1
COMMAND RFs1 new
COMMAND RFs1 Connect
COMMAND !Error=-28 RFs1 CreatePrivatePath PBASE-F32-RFS-PublicApi-2103-001-CreatePrivatePath_command03
COMMAND RFs1 Close
COMMAND RFs1 ~
END_TEST_BLOCK
END_TESTCASE PBASE-F32-RFS-PublicApi-2103