os/kernelhwsrv/baseapitest/basesvs/validation/f32/sfsrv/scripts/PBASE-F32-Format-PublicApi-RAM.script
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
//
sl@0
     2
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     3
// All rights reserved.
sl@0
     4
// This component and the accompanying materials are made available
sl@0
     5
// under the terms of "Eclipse Public License v1.0"
sl@0
     6
// which accompanies this distribution, and is available
sl@0
     7
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
//
sl@0
     9
// Initial Contributors:
sl@0
    10
// Nokia Corporation - initial contribution.
sl@0
    11
//
sl@0
    12
// Contributors:
sl@0
    13
//
sl@0
    14
// Description: 
sl@0
    15
//
sl@0
    16
//! 	@file
sl@0
    17
//! 	@SYMTestSuiteName		pbase-f32-sfsrv-publicapi-ram
sl@0
    18
//!	@SYMScriptTestEnvironment	This test script requires a basic ROM.
sl@0
    19
//! 	@SYMScriptAuthor 		Alvar Udras, Runno Sgirka
sl@0
    20
//! 	@SYMScriptDescription		The test script contains API tests for the following functions of RFormat class:
sl@0
    21
//!	TInt Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount);
sl@0
    22
//!	void Close();
sl@0
    23
sl@0
    24
LOAD_SUITE	t_sfsrv
sl@0
    25
DELAY 5000
sl@0
    26
sl@0
    27
sl@0
    28
START_TESTCASE 			PBASE-F32-Format-PublicApi-1004
sl@0
    29
//! @SYMTestCaseID		PBASE-F32-Format-PublicApi-1004
sl@0
    30
//! @SYMAPI			RFormat
sl@0
    31
//! @SYMTestCaseDesc		Function Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) test. Call Open() with invalid
sl@0
    32
//!				drive letter value.
sl@0
    33
//!				Uses API elements: Open(), Close().
sl@0
    34
//! @SYMTestActions		1. Create RFs session.
sl@0
    35
//!				2. Connect the RFs session.
sl@0
    36
//!				3. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method, passing the RFs session,
sl@0
    37
//!				   "InvalidDriveLetter", EQuickFormat, aCount as parameters.
sl@0
    38
//!				4. Call Close() to close the RFormat instance.
sl@0
    39
//!				5. Close RFs session.
sl@0
    40
//! @SYMTestStatus		Implemented
sl@0
    41
//! @SYMTestPriority		Critical
sl@0
    42
//! @SYMTestExpectedResults	The Open() method call returns error -28 (KErrBadName).
sl@0
    43
//! @SYMTestType		CIT
sl@0
    44
	START_TEST_BLOCK	100	t_sfsrv	\base\PBASE-F32-Format-PublicApi.ini 
sl@0
    45
		CREATE_OBJECT	RFs	rfs1
sl@0
    46
		CREATE_OBJECT	RFormat	format1
sl@0
    47
		COMMAND			rfs1	new
sl@0
    48
		COMMAND			rfs1	Connect
sl@0
    49
		COMMAND			format1	new
sl@0
    50
		COMMAND	!Error=-28	format1	Open		PBASE-F32-Format-PublicApi-1004-001-Open_command05
sl@0
    51
		COMMAND			format1	Close
sl@0
    52
		COMMAND			format1	~
sl@0
    53
		COMMAND			rfs1	Close
sl@0
    54
		COMMAND			rfs1	~
sl@0
    55
	END_TEST_BLOCK	
sl@0
    56
END_TESTCASE 			PBASE-F32-Format-PublicApi-1004
sl@0
    57
sl@0
    58
START_TESTCASE 			PBASE-F32-Format-PublicApi-1006
sl@0
    59
//! @SYMTestCaseID		PBASE-F32-Format-PublicApi-1006
sl@0
    60
//! @SYMAPI			RFormat
sl@0
    61
//! @SYMTestCaseDesc		Function Close() test. Call Close() without calling Open() first.
sl@0
    62
//!				Uses API elements: Close().
sl@0
    63
//! @SYMTestActions		1. Create RFs session.
sl@0
    64
//!				2. Connect the RFs session.
sl@0
    65
//!				3. Call Close() to close the RFormat instance.
sl@0
    66
//!				4. Close RFs session.
sl@0
    67
//! @SYMTestStatus		Implemented
sl@0
    68
//! @SYMTestPriority		Critical
sl@0
    69
//! @SYMTestExpectedResults	The Close() method call will complete without errors.
sl@0
    70
//! @SYMTestType		CIT
sl@0
    71
	START_TEST_BLOCK	100	t_sfsrv	\base\PBASE-F32-Format-PublicApi.ini 
sl@0
    72
		CREATE_OBJECT	RFs	rfs1
sl@0
    73
		CREATE_OBJECT	RFormat	format1
sl@0
    74
		COMMAND		rfs1	new
sl@0
    75
		COMMAND		rfs1	Connect
sl@0
    76
		COMMAND		format1	new
sl@0
    77
		COMMAND		format1	Close
sl@0
    78
		COMMAND		format1	~
sl@0
    79
		COMMAND		rfs1	Close
sl@0
    80
		COMMAND		rfs1	~
sl@0
    81
	END_TEST_BLOCK	
sl@0
    82
END_TESTCASE 			PBASE-F32-Format-PublicApi-1006
sl@0
    83
sl@0
    84
START_TESTCASE 			PBASE-F32-Format-PublicApi-1011
sl@0
    85
//! @SYMTestCaseID		PBASE-F32-Format-PublicApi-1011
sl@0
    86
//! @SYMAPI			RFormat
sl@0
    87
//! @SYMTestCaseDesc		Function Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) test. Call Open() with
sl@0
    88
//!				not mounted drive letter value.
sl@0
    89
//!				Uses API elements: Open(), Close().
sl@0
    90
//! @SYMTestActions		1. Create RFs session.
sl@0
    91
//!				2. Connect the RFs session.
sl@0
    92
//!				3. Call Open(RFs &aFs, const TDesC &aName, TUint aFormatMode, TInt &aCount) method, passing the RFs session,
sl@0
    93
//!				   "NotMountedDriveChar", EQuickFormat, aCount as parameters.
sl@0
    94
//!				4. Call Close() to close the RFormat instance.
sl@0
    95
//!				5. Close RFs session.
sl@0
    96
//! @SYMTestStatus		Implemented
sl@0
    97
//! @SYMTestPriority		Critical
sl@0
    98
//! @SYMTestExpectedResults	The Open() method call returns error -18 (KErrNotReady).
sl@0
    99
//! @SYMTestType		CIT
sl@0
   100
	START_TEST_BLOCK	100	t_sfsrv	\base\PBASE-F32-Format-PublicApi.ini 
sl@0
   101
		CREATE_OBJECT	RFs	rfs1
sl@0
   102
		CREATE_OBJECT	RFormat	format1
sl@0
   103
		COMMAND			rfs1	new
sl@0
   104
		COMMAND			rfs1	Connect
sl@0
   105
		COMMAND			format1	new
sl@0
   106
		COMMAND	!Error=-18	format1	Open		PBASE-F32-Format-PublicApi-1011-001-Open_command05
sl@0
   107
		COMMAND			format1	Close
sl@0
   108
		COMMAND			format1	~
sl@0
   109
		COMMAND			rfs1	Close
sl@0
   110
		COMMAND			rfs1	~
sl@0
   111
	END_TEST_BLOCK	
sl@0
   112
END_TESTCASE 			PBASE-F32-Format-PublicApi-1011