serviceproviders/sapi_mediamanagement/tsrc/testing/tmediaprovidertesting/conf/tmediamgmttest_all.cfg
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 27 Aug 2009 07:43:07 +0300
changeset 22 fc9cf246af83
permissions -rw-r--r--
Revision: 200931 Kit: 200935

 /*  ===========================================================================
 *  Copyright © 2006-2007 Nokia Corporation.
 *  This material, including documentation and any related
 *  computer programs, is protected by copyright controlled by
 *  Nokia Corporation. All rights are reserved. Copying,
 *  including reproducing, storing, adapting or translating, any
 *  or All of this material requires the prior written consent of
 *  Nokia Corporation. This material also contains confidential
 *  information which may not be disclosed to others without the
 *  prior written consent of Nokia Corporation.
 * ============================================================================
 Expected aaaa aaaa aaaa aaaa aaaa aaaa aaaa Next Bbbb bbb bbb bbb bbb bbb bbb End 
 
 */

/*key startRange endRange sortKey sortOrder errorcode 
[Expected type fileName fileExtension drive fileSize fileDate fileNameAndPath mimeType
[Next "next map data" End]].
*/
################################################## All ###################################################
/*
NOTE:
1. NULL input means not passing any value for the placeholder
2. NULLVALUE means a NULL is passed as value to the placeholder
3. "NULL" as input to a parameter means a Null string or a string of value "NULL" is passed as input
4. All the fields in input is mandatory, if no value is to be passed for any field, a value NULL can be passed. And if NULL is to be passed as value, then 
	value "NULLVALUE" needs to be passed.
5. The key-value pair in Expected output can be in any order and All are optional.


Requirements:
The following image files are expected to be present at the mentioned locations. All the cases below are written based on this assumption. 
The expected output is as per this list.

The Expected output is of the form where All fields of each map is written in between two keys StartMap and EndMap 
All the maps are written between two key words ExpectedStart and ExpectedEnd, as shown below

FileNameAndPath:											Expected o/p for the file in format mentioned below:
c:\data\Images\a.jpg          				StartMap Type Media FileName a FileExtension .jpg Drive c: FileSize 31097 FileDate 20070920:053905 FileNameAndPath c:\data\Images\a.jpg MimeType image/jpeg EndMap
c:\data\Images\ant.jpg								StartMap Type Media FileName ant FileExtension .jpg Drive c: FileSize 8474 FileDate 20060819:102426 FileNameAndPath c:\data\Images\ant.jpg MimeType image/jpeg EndMap
c:\data\Images\blue.png 							StartMap Type Media FileName blue FileExtension .png Drive c: FileSize 4796 FileDate 20070302:120443 FileNameAndPath c:\data\Images\blue.png MimeType image/png EndMap
c:\data\Images\pictures\dreams.bmp 		StartMap Type Media FileName dreams FileExtension .bmp Drive c: FileSize 73105 FileDate 20070108:015537 FileNameAndPath c:\data\Images\pictures\dreams.bmp MimeType image/bmp EndMap
e:\data\Images\stars.jpg 							StartMap Type Media FIleName stars FileExtension .jpg Drive e: FileSize 24790 FileDate 20081019:033638 FileNameAndPath e:\data\Images\stars.jpg MimeType image/jpeg EndMap



//Testcase format:
//Description of the testcase
//Input: Input values
//Expected:(+ve/-ve case) Expected output or behaviour 
[Test]
title Sample
create tmediaprovidertesting foobar
//foobar GetFilesListL <Type> <FileType> <Key> <StartRange> <EndRange> <SortKey> <SortOrder> <expected error code> ExpectedStart StartMap Type <Type value> FileName <filename value FileExtension <FileExtension value> Drive <Drive value> FileSize <FileSize value> FileDate <FileDate value> FileNameAndPath <FileNameAndPath value> MimeType <MimeType value> EndMap ExpectedEnd
foobar GetFilesListL FileInfo Image FileName a NULL NULL NULL 0 ExpectedStart StartMap Type Media FileName a FileExtension .jpg Drive c: FileSize 31097 FileDate 20070920:053905 FileNameAndPath c:\data\Images\a.jpg MimeType image/jpeg EndMap ExpectedEnd 
delete foobar
[Endtest]

*/
############################################### Test cases starts ###############################################

//GetList with value "FileInfo" for Type input and no other input parameters
//Input: FileInfo as Type, other inputs are NULL
//Expected: errorcode 1003- MissingArgumentType error as the mandatory FileType input is missing
[Test]
title All_FileName
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileName tempo NULL NULL NULL 0  
delete foobar
[Endtest]

//GetList of All files by FileName, no startrange
//Input: FileName as Key and Null startrange
//Expected: errorcode 1003-MissingArgumentType is expected o/p as the startrange is mandatory when Key is mentioned
[Test]
title AllNeg_FileNameKeywithNoStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileName NULL NULL NULL NULL 1003  
delete foobar
[Endtest]


//GetList of All files by key SongName, no startrange
//Input: SongName as key and Null startrange
//Expected: errorcode 1003-MissingArgumentType
[Test]
title AllNeg_SongNameKeyWithNoStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All SongName NULL NULL NULL NULL 1003
delete foobar
[Endtest]

//GetList of All files by key Artist, no startrange
//Input: Artist as Key and Null startrange
//Expected: errorcode 1003-MissingArgumentType
[Test]
title AllNeg_ArtistKeyWithNoStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Artist NULL NULL NULL NULL 1003
delete foobar
[Endtest]


//GetList of All files by key Album, no startrange
//Input: Album as Key and Null startrange
//Expected: errorcode 1003-MissingArgumentType
[Test]
title AllNeg_AlbumKeyWithNoStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Album NULL NULL NULL NULL 1003
delete foobar
[Endtest]

//GetList of All files by key TrackNumber, no startrange
//Input: TrackNumber as Key and Null startrange
//Expected: errorcode 1002-BadArgumentType
[Test]
title AllNeg_TrackNumberKeyWithNoStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All TrackNumber NULL NULL NULL NULL 1002
delete foobar
[Endtest]

//GetList of All files by key Genre, no startrange
//Input: Genre as Key and Null startrange
//Expected: errorcode 1003-MissingArgumentType
[Test]
title AllNeg_GenreKey_WithNoStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Genre NULL NULL NULL NULL 1003
delete foobar
[Endtest]

//GetList of All files by key Composer, no startrange
//Input: Composer as Key and Null startrange
//Expected: errorcode 1003-MissingArgumentType
[Test]
title AllNeg_ComposerKey_WithNoStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Composer NULL NULL NULL NULL 1003
delete foobar
[Endtest]

//GetList with startrange for FileName
//Input: FileName as Key, music1 as startrange
//Expected: list of All files with FileName music1, sorted in ascending order based on FileName, which is the default sort key and order
[Test]
title All_FileNameKeyWithValidStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileName tempo NULL NULL NULL 0 ExpectedStart StartMap FileName tempo EndMap ExpectedEnd 
delete foobar
[Endtest]

//GetList of All files by MimeType
//Input: MimeType as Key, AUDIO/MPEG as startrange 
//Expected: list of All files with MimeType AUDIO/MPEG are expected
[Test]
title All_MimeTypeKey_Audio/mpegStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All MimeType AUDIO/MPEG NULL NULL NULL 0 ExpectedStart StartMap FileName music1 MimeType AUDIO/MPEG EndMap StartMap FileName music2 MimeType AUDIO/MPEG EndMap StartMap FileName music3 MimeType AUDIO/MPEG EndMap StartMap FileName music4 MimeType AUDIO/MPEG EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList of All files by FileNameAndPath
//Input: FileNameAndPath as Key and c:\data\sounds\digital\music2.mp3 as startrange
//Expected: list of All files with file path c:\data\sounds\digital\music2.mp3 is expected
[Test]
title All_FileNameAndPathKey_WithValidStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileNameAndPath c:\data\sounds\digital\music2.mp3 NULL NULL NULL 0 ExpectedStart StartMap FileNameAndPath c:\data\sounds\digital\music2.mp3 EndMap ExpectedEnd   
delete foobar
[Endtest]

 //This case is removed as we are not able to get SongName field from the underlying
//A bug with ID: RCHA-7N2938 has been raised for the same
//GetList of All files by key SongName
//Input: SongName as Key and music1 as startrange
//Expected: list of All files with SongName as music1 is expected
[Test]
title All_SongNameKey_music1.mp3StartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All SongName music1.mp3 NULL NULL NULL 0 ExpectedStart StartMap FileName music1 SongName music1.mp3 EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList of All files by key Artist
//Input: Artist as Key Rafi as startrange
//Expected: list of All files with Artist Rafi is expected
[Test]
title All_ArtistKey_WithValidStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Artist Rafi NULL NULL NULL 0 ExpectedStart StartMap FileName music2 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList of All files by key Album
//Input: Album as Key and Shaheed as startrange 
//Expected: list of All files with Album value as Shaheed is expected
[Test]
title All_AlbumKey_WithValidStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Album Shaheed NULL NULL NULL 0 ExpectedStart StartMap FileName music2 Album Shaheed EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList of All files by key Genre
//Input: Genre as Key and Rock as startrange
//Expected: list of All files with Genre as Rock is expected
[Test]
title All_GenreKeyWithValidStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Genre Rock NULL NULL NULL 0 ExpectedStart StartMap FileName music1 Genre Rock EndMap StartMap FileName music4 Genre Rock EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList of All files by key Composer
//Input: Composer as Key and malik as startrange
//Expected: list of All with Composer as Malik
[Test]
title All_ComposerKeyWithValidStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Composer Malik NULL NULL NULL 0 ExpectedStart StartMap FileName music4 Composer Malik EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList with null string as value for FileNameAndPath
//Input: FileNameAndPath as Key and a null string "null" as startrange
//Expected: errorcode 0 and empty list
[Test]
title All_FileNameAndPathKey_NullStringStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileNameAndPath "NULL" NULL NULL NULL 0 
delete foobar
[Endtest]

//GetList with integer value for FileName
//Input: FileName as Key and an integer value 12 as startrange
//Expected: errorcode 0 and empty list as there are no All files with this name
[Test]
title All_IntegerStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileName 12 NULL NULL NULL 0 
delete foobar
[Endtest]

#####################################  Type==“FileInfo” + Passing Filter Map with FileType==All + Sort Map #################################

//GetList with Ascending order for a given drive
//Input: Drive as SortKey and Ascending as SortOrder
//Expected: list of music files sorted in ascending order based on drive
[Test]
title All_SortAscendingOnDrive
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Genre Rock NULL Drive Ascending 0 ExpectedStart StartMap FileName music1 Genre Rock EndMap StartMap FileName music4 Genre Rock EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Descending order for a given drive
//Input: Drive as SortKey and Descending as SortOrder
//Expected: list of music files sorted in descending order based on drive
[Test]
title All_SortDescendingOnDrive
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Genre Rock NULL Drive Descending 0 ExpectedStart StartMap FileName music4 Genre Rock EndMap StartMap FileName music1 Genre Rock EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Ascending order for a given FileExtension
//Input: FileExtension as SortKey and Ascending as SortOrder
//Expected: list of music files sorted in ascending order based on FileExtension
[Test]
title All_SortAscendingOnFileExtension
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL FileExtension Ascending 0 ExpectedStart StartMap FileName music4 FileExtension .mp3 EndMap StartMap FileName music5 FileExtension .rm EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Descending order for a given FileExtension
//Input: FileExtension as SortKey and Descending as SortOrder
//Expected: list of music files sorted in descending order based on FileExtensions
[Test]
title All_SortDescendingOnFileExtension
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL FileExtension Descending 0 ExpectedStart StartMap FileName music5 FileExtension .rm EndMap StartMap FileName music4 FileExtension .mp3 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Ascending order for a given MimeType
//Input: MimeType as SortKey and Ascending as SortOrder
//Expected: list of music files sorted in ascending order based on MimeType
[Test]
title All_SortAscendingOnMimeType
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL MimeType Ascending 0 ExpectedStart StartMap FileName music4 MimeType AUDIO/MPEG EndMap StartMap FileName music5 MimeType audio/x-pn-realaudio EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Descending order for a given MimeType
//Input: MimeType as sortKey and Descending as SortOrder
//Expected: list of music files sorted in descending order based on MimeType
[Test]
title All_SortDescendingOnMimeType
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL MimeType Descending 0 ExpectedStart StartMap FileName music5 MimeType audio/x-pn-realaudio EndMap StartMap FileName music4 MimeType AUDIO/MPEG EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Ascending order for a given FileSize
//Input: FileSize as sortKey and Ascending as SortOrder
//Expected: list of music files sorted in ascending order based on FileSize
[Test]
title All_SortAscendingOnFileSize
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL FileSize Ascending 0 ExpectedStart StartMap FileName music4 FileSize 434288 EndMap StartMap FileName music5 FileSize 1381291 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Descending order for a given FileSize
//Input: FileSize as sortKey and Descending as SortOrder
//Expected: list of music files sorted in descending order based on FileSize
[Test]
title All_SortDescendingOnFileSize
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL FileSize Descending 0 ExpectedStart StartMap FileName music5 FileSize 1381291 EndMap StartMap FileName music4 FileSize 434288 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Ascending order for a given FileDate
//Input: FileDate as SortKey and Ascending as SortOrder
//Expected: list of music files sorted in ascending order based on FileDate
[Test]
title All_SortAscendingOnFileDate
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Genre Rock NULL FileDate Ascending 0 ExpectedStart StartMap FileName music1 FileDate 20090116:091802 EndMap StartMap FileName music4 FileDate 20090117:111341 EndMap ExpectedEnd 
delete foobar
[Endtest]

//GetList with Descending order for a given FileDate
//Input: FileDate as SortKey and Descending as SortOrder
//Expected: list of music files sorted in descending order based on FileDate
[Test]
title All_SortDescendingOnFileDate
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Genre Rock NULL FileDate Descending 0 ExpectedStart StartMap FileName music4 FileDate 20090117:111341 EndMap StartMap FileName music1 FileDate 20090116:091802 EndMap ExpectedEnd 
delete foobar
[Endtest]

//GetList with Ascending order for a given Artist
//Input: Artist as SortKey and Ascending as SortOrder
//Expected: list of music files sorted in ascending order based on Artist
[Test]
title All_SortAscendingOnArtist
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive c: NULL Artist Ascending 0 ExpectedStart StartMap FileName music1 Artist Lata EndMap StartMap FileName music2 Artist Rafi EndMap StartMap FileName music3 Artist Sonu EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Descending order for a given Artist
//Input: Artist as SortKey and Descending as SortOrder
//Expected: list of music files sorted in descending order based on Artist
[Test]
title All_SortDescendingOnArtist
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive c: NULL Artist Descending 0 ExpectedStart StartMap FileName music3 Artist Sonu EndMap StartMap FileName music2 Artist Rafi EndMap StartMap FileName music1 Artist Lata EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList with Ascending order for a given Genre
//Input: Genre as SortKey and Ascending as SortOrder
//Expected: list of music files sorted in ascending order based on Genre
[Test]
title All_SortAscendingOnGenre
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 400000 500000 Genre Ascending 0 ExpectedStart StartMap FileName music3 Genre Classical EndMap StartMap FileName music4 Genre Rock EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Descending order for a given Genre
//Input: Genre as SortKey and Descending as SortOrder
//Expected: list of music files sorted in descending order based on Genre
[Test]
title All_SortDescendingOnGenre
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 400000 500000 Genre Descending 0 ExpectedStart StartMap FileName music4 Genre Rock EndMap StartMap FileName music3 Genre Classical EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Ascending order for a given Composer
//Input: Composer as SortKey and Ascending as SortOrder
//Expected: list of music files sorted in ascending order based on Composer
[Test]
title All_SortAscendingOnComposer
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive c: NULL Composer Ascending 0 ExpectedStart StartMap FileName music1 Composer Anu EndMap StartMap FileName music2 Composer Dhawan EndMap StartMap FileName music3 Composer Rahman EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Descending order for a given Composer
//Input: Composer as SortKey and Descending as SortOrder
//Expected: list of music files sorted in descending order based on Composer
[Test]
title All_SortDescendingOnComposer
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive c: NULL Composer Descending 0 ExpectedStart StartMap FileName music3 Composer Rahman EndMap StartMap FileName music2 Composer Dhawan EndMap StartMap FileName music1 Composer Anu EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList with Ascending order for a given Album
//Input: Album as SortKey and Ascending as SortOrder
//Expected: list of music files sorted in ascending order based on Album
[Test]
title All_SortAscendingOnAlbum
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive c: NULL Album Ascending 0 ExpectedStart StartMap FileName music3 Album Album1 EndMap StartMap FileName music1 Album Album2 EndMap StartMap FileName music2 Album Shaheed EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList Nokia as SortOrder
//Input: FileDate as SortKey and Nokia as SortOrder
//Expected: errorcode 1002-BadArgumentType
[Test]
title AllNeg_NokiaSortOrder
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All NULL NULL NULL FileDate Nokia 1002
delete foobar
[Endtest]


//GetList ascending(case sensitive) as sort order
//Input: FileName as SortKey and ascending as SortOrder
//Expected: list of music files sorted in ascending order based on FileName
[Test]
title All_WithLowercaseascendingAsSortOrder
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive c: NULL FileName ascending 0 ExpectedStart StartMap FileName music1 EndMap StartMap FileName music2 EndMap StartMap FileName music3 EndMap ExpectedEnd 
delete foobar
[Endtest]


//GetList Ascending sort order for FileNameAndPath
//Input: FileNameAndPath as SortKey and Ascending as SortOrder
//Expected: list of music files sorted in ascending order based on FileNameAndPath
[Test]
title All_SortAscendingOnFileNameAndPath
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive c: NULL FileNameAndPath Ascending 0 ExpectedStart StartMap FileNameAndPath c:\data\others\music3.mp3 EndMap StartMap FileNameAndPath c:\data\sounds\digital\music1.mp3 EndMap StartMap FileNameAndPath c:\data\sounds\digital\music2.mp3 EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList Descending order for FileName
//Input: FileName as SortKey and Descending as SortOrder
//Expected: list of music files sorted in descending order based on FileName
[Test]
title All_SortDescendingOnFileName
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive c: NULL FileName Descending 0 ExpectedStart StartMap FileName music3 EndMap StartMap FileName music2 EndMap StartMap FileName music1 EndMap ExpectedEnd
delete foobar
[Endtest]
############################################################################ End Music cases #############################################################
//GetList with value "FileInfo" for Type input and no other input parameters
//Input: FileInfo as Type, other inputs are NULL
//Expected: errorcode 1003- MissingArgumentType error as the mandatory FileType input is missing
[Test]
title AllNeg_FileInfoType_NoFileType
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo NULL NULL NULL NULL NULL NULL 1003
delete foobar
[Endtest]


//GetList with value other than "FileInfo" for Type input
//Input: FolderInfo inplace of Type input where valid value to be passed is FileInfo
//Expected: errorcode 1004- ServiceNotSupported
[Test]
title AllNeg_FolderInfoType
create tmediaprovidertesting foobar
foobar GetFilesListL FolderInfo All FileName a NULL NULL NULL 1004 
delete foobar
[Endtest]

//GetList with "FileInfo" as value for Type with a FileType input
//Input: "FileInfo" as value for Type and Image as value for FileType, FileName as Key, "a" as startrange
//Expected: list of details of All image files named 'a' are returned
[Test]
title All_NoOptionalInputs
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All NULL NULL NULL NULL NULL 0 ExpectedStart StartMap FileName a EndMap StartMap FileName ant EndMap StartMap FileName blue EndMap StartMap FileName dreams EndMap StartMap FileName stars EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList with lower case "fileinfo" as value for Type input
//Input: lowercase "fileinfo" as value for Type
//Expected: image list based on the filter key and value
[Test]
title All_fileinfoType
create tmediaprovidertesting foobar
foobar GetFilesListL fileinfo All FileName a NULL NULL NULL 0 ExpectedStart StartMap Type Media FileName a FileExtension .jpg Drive c: FileSize 31097 FileDate 20070920:053905 FileNameAndPath c:\data\Images\a.jpg MimeType image/jpeg EndMap ExpectedEnd 
delete foobar
[Endtest]

//GetList with NULL as Type input
//Input: NULLVALUE as value for Type(Note: Passing NULLVALUE means that a value null is passed as input to Type), Image as FileType
//Expected: errorcode 1004- ServiceNotSupported error is expected as the value FileInfo is expected as input for Type and not NULLVALUE
[Test]
title AllNeg_NullType
create tmediaprovidertesting foobar
foobar GetFilesListL NULLVALUE All NULL NULL NULL NULL NULL 1004
delete foobar
[Endtest]


//GetList with no input for Type 
//Input: NULL as value for Type(Note: Passing NULL means that no input is passed), Image as FileType 
//Expected: errorcode 1003- MissingArgument error is expected as the Type is mandatory input
[Test]
title AllNeg_NoType
create tmediaprovidertesting foobar
foobar GetFilesListL NULL All NULL NULL NULL NULL NULL 1003
delete foobar
[Endtest]


//GetList with integer value for Type input
//Input: integer value 12 for Type, Image as FileType
//Expected: errorcode 1004- ServiceNotSupported
[Test]
title AllNeg_IntegerType
create tmediaprovidertesting foobar
foobar GetFilesListL 12 All NULL NULL NULL NULL NULL 1004
delete foobar
[Endtest]

//GetList with lowercase value "image" for FileType input
//Input: "image"(1st letter lowercase) as value for FileType, FileName as Key and a as value for startrange
//Expected: list of image files filtered based on Filter Key and Value. The list of All files with name a is returned. The expected result has All the details of the expected file named a
//The output is in terms of a map starting and ending with keywords StartMap and EndMap respectively
[Test]
title All_imageFileType
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileName a NULL NULL NULL 0 ExpectedStart StartMap Type Media FileName a FileExtension .jpg Drive c: FileSize 31097 FileDate 20070920:053905 FileNameAndPath c:\data\Images\a.jpg MimeType image/jpeg EndMap ExpectedEnd 
delete foobar
[Endtest]

//GetList with img as value to FileType input
//Input: img as value for FileType and no values(NULL) for All other inputs
//Expected errorcode 1002- BadArgumentType error
[Test]
title AllNeg_imgFileType
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo al NULL NULL NULL NULL NULL 1002
delete foobar
[Endtest]


//GetList with Nokia as input to FileType input
//Input: Nokia as value for FileType and no values(NULL) for All other inputs
//Expected: errorcode 1002- BadArgumentType error
[Test]
title AllNeg_NokiaFileType
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo Nokia NULL NULL NULL NULL NULL 1002
delete foobar
[Endtest]


//GetList with E:\Image as value to FileType input
//Input: E:\Image as FIleType and no value (NULL) for All other values
/Expected: errorcode 1002- BadArgumentType error
[Test]
title AllNeg_E:\ImageFileType
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo E:\Image NULL NULL NULL NULL NULL 1002
delete foobar
[Endtest]



//GetList with empty string as FileType
//Input: empty string as FileType and no values(NULL) for All other inputs
/Expected: errorcode 1002- BadArgumentType error
[Test]
title AllNeg_EmptyStringFileType
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo "" NULL NULL NULL NULL NULL 1002
delete foobar
[Endtest]


//GetList with NULL as FileType
//Input: NULLVALUE as FileType(Note this means that we are passing NULL as input to FileType),All other inputs are not passed
/Expected: errorcode 1002- BadArgumentType error
[Test]
title AllNeg_NullFileType
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo NULLVALUE NULL NULL NULL NULL NULL 1002
delete foobar
[Endtest]


//GetList with integer value input to FileType
//Input: 12 as value for FileType and no values for All other inputs
/Expected: errorcode 1002- BadArgumentType error as invalid value is passed for FileType
[Test]
title AllNeg_IntegerFileType
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo 12 NULL NULL NULL NULL NULL 1002
delete foobar
[Endtest]

###################################################################Type==“FileInfo” + Passing Filter Map with FileType==Image + [Key]############################################################################

//GetList with FileName as key, no StartRange
//Input: FileName as key, All other values are not passed
/Expected: errorcode 1003- MissingArgumentType
[Test]
title All_ImgNeg_FileNameKey
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileName NULL NULL NULL NULL 1003 
delete foobar
[Endtest]

//GetList with no FilterKey
//Input:  NULL(means no value being passed) as Key ,All other inputs are not passed
//Expected: list of All images present in the device, The expected output has the FileName of All files expected to be retrieved.
[Test]
title All_Img_NoOptionalFields
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All NULL NULL NULL NULL NULL 0 ExpectedStart StartMap FileName a EndMap StartMap FileName ant EndMap StartMap FileName blue EndMap StartMap FileName dreams EndMap StartMap FileName stars EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with FileExtension as key, but no StartRange
//Input: FileExtension as Key and no value for All other keys
//Expected: errorcode 1003- MissingArgumentType as the StartRange is mandatory when Key is mentioned
[Test]
title All_ImgNeg_FileExtensionKey_NoStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileExtension NULL NULL NULL NULL 1003 
delete foobar
[Endtest]

//GetList with Drive as key and no startrange
//Input: Drive as Key and no input for All other input parameters
//Expected: errorcode 1003- MissingArgumentType as the StartRange is mandatory when Key is mentioned
[Test]
title All_ImgNeg_DriveKey_NoStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive NULL NULL NULL NULL 1003 
delete foobar
[Endtest]


//GetList with FileSize as key and no startrange
//Input: FileSize as Key and no input for All other input parameters
//Expected: errorcode 1002- BadArgumentType as the StartRange is mandatory when Key is mentioned
[Test]
title All_ImgNeg_FileSizeKey_NoStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize NULL NULL NULL NULL 1002 
delete foobar
[Endtest]


//GetList with FileDate as key and no startrange
//Input: FileDate as Key and no input for All other input parameters
//Expected: errorcode 1002- BadArgumentType as the StartRange is mandatory when Key is mentioned
[Test]
title All_ImgNeg_FileDateKey_NoStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileDate NULL NULL NULL NULL 1002 
delete foobar
[Endtest]


//GetList with MimeType as key and no startrange
//Input: MimeType as Key and no input for All other input parameters
//Expected: errorcode 1003- MissingArgumentType as the StartRange is mandatory when Key is mentioned
[Test]
title All_ImgNeg_MimeTypeKey_NoStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All MimeType NULL NULL NULL NULL 1003 
delete foobar
[Endtest]


//GetList with FileNameAndPath as key and no startrange
//Input: FileNameAndPath as Key and no input for All other input parameters
//Expected: errorcode 1003- MissingArgumentType as the StartRange is mandatory when Key is mentioned
[Test]
title All_ImgNeg_FileNameAndPathKey_NoStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileNameAndPath NULL NULL NULL NULL 1003
delete foobar
[Endtest]


//GetList with Nokia as key
//Input: Nokia as key and a valid value c:\data\Images\a.jpg as value for startrange, and no input for All other parameters
//Expected: errorcode 1002- BadArgumentType is expected as the value for key is invalid
[Test]
title All_ImgNeg_NokiaKey
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Nokia c:\data\Images\a.jpg NULL NULL NULL 1002
delete foobar
[Endtest]


//GetList with NULL value as key
//Input: NULLVALUE as input for Key(means a value NULL is input to Key),and a valid c:\data\Images\a.jpg as value for startrange and no value for other inputs
//Expected: 1002-BadArgumentType errorcode is returned as NULL is invalid value for Key
[Test]
title All_Img_NullKey
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All NULLVALUE c:\data\Images\a.jpg NULL NULL NULL 0 ExpectedStart StartMap FileName a EndMap StartMap FileName ant EndMap StartMap FileName blue EndMap StartMap FileName dreams EndMap StartMap FileName stars EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList with Empty string as key
//Input: empty string "" as value for Key and a valid value "c:\data\Images\a.jpg" as value for startrange and other inputs are not passed
//Expected: errorcode 1002- BadArgumentType 
[Test]
title All_ImgNeg_EmptyStringKey
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All "" c:\data\Images\a.jpg NULL NULL NULL 1002
delete foobar
[Endtest]


//GetList with invalid case as key
//Input: filename(1st letter lowercase) as Key and a as value for startrange
//returns list of images based on the filter key and value. details of files named a is expected as output
[Test]
title All_Img_filenameKey
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All filename a NULL NULL NULL 0 ExpectedStart StartMap FileName a EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList with Sapi as value for filter key
//Input: Sapi as Key and a valid c:\data\Images\a.jpg as value for startrange
//Expected: errorcode 1002- BadArgumentType as Sapi is invalid key
[Test]
title All_ImgNeg_SapiKey
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Sapi c:\data\Images\a.jpg NULL NULL NULL 1002
delete foobar
[Endtest]


//GetList with integer value for Filter key
//Input: 12 as Key, and a valid value "c:\data\Images\a.jpg" as value for startrange
//Expected: errorcode 1002- BadArgumentType as the value expected is out of type string and integer is input
[Test]
title All_ImgNeg_IntegerKey
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All 12 c:\data\Images\a.jpg NULL NULL NULL 1002
delete foobar
[Endtest]

##########################Type==“FileInfo” + Passing Filter Map with FileType==Image + Key+Start Range###############################
//GetList with NULL StartRange
//Input: FileName as Key and NULLVALUE as startrange(means we are passing NULL as value for startrange)
//Expected: errorcode- 1003 MissingArgumenterror, as the startrange is mandatory when key is input
[Test]
title All_ImgNeg_NoStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileName NULLVALUE NULL NULL NULL 1003
delete foobar
[Endtest]

//GetList with FileName StartRange
//Input: FileName as Key and value a as startrange
//Expected list of images filtered based on FileName. Details of All files named a is expected output
[Test]
title All_Img_FileNameKeyWithStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileName a NULL NULL NULL 0 ExpectedStart StartMap FileName a EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with FileExtension StartRange
//Input: FileExtension as Key and .jpg as value for startrange
//Expected  list of images filtered based on FileExtension. details of All files with extension .jpg is the expected output
[Test]
title All_Img_FileExtensionKeyWithStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileExtension .jpg NULL NULL NULL 0 ExpectedStart StartMap FileName a FileExtension .jpg EndMap StartMap FileName ant FileExtension .jpg EndMap StartMap FileName stars FileExtension .jpg EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Drive StartRange
//Input: Drive as Key and c: as value for startrange
//Expected list of images filtered based on Drive. details of All files with drive value c: is expected
[Test]
title All_Img_DriveKey_c:StartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive c: NULL NULL NULL 0 ExpectedStart StartMap FileName a Drive c: EndMap StartMap FileName ant Drive c: EndMap StartMap FileName blue Drive c: EndMap StartMap FileName dreams Drive c: EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with FileSize StartRange
//Input: FileSize as Key and 70000 as value for startrange
//Expected: list of images filtered based on FileSize. details of All files with size 70000 is expected
[Test]
title All_Img_FileSizeKeyWithStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 70000 NULL NULL NULL 0 ExpectedStart StartMap FileSize dreams FileSize 73105 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with FileDate StartRange
//Input: FileDate as Key and 20081019:033638 as value for startrange
//Expected: list of images filtered based on FileDate 20081019:033638. The details of All files with date 20081019:033638 is the output
[Test]
title All_Img_FileDateKeyWithStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileDate 20081019:033638 NULL NULL NULL 0 ExpectedStart StartMap FileName stars FileDate 20081019:033638 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with MimeType StartRange
//Input: MimeType as Key and image/jpeg as value for startrange
//Expected: list of images filtered based on MimeType image/jpeg. 
[Test]
title All_Img_MimeTypeKeyWithStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All MimeType image/jpeg NULL NULL NULL 0 ExpectedStart StartMap FileName a MimeType image/jpeg EndMap StartMap FileName ant MimeType image/jpeg EndMap StartMap FileName stars MimeType image/jpeg EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with FileNameAndPath StartRange
//Input: FileNameAndPath as StartRange and c:\data\Images\a.jpg as value for startrange
//Expected: list of images filtered based on FileNameAndPath, i.e., returns the details about file a.jpg at c:\data\Images\a.jpg
[Test]
title All_Img_FileNameAndPathKeyWithStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileNameAndPath c:\data\Images\a.jpg NULL NULL NULL 0 ExpectedStart StartMap FileNameAndPath c:\data\Images\a.jpg EndMap ExpectedEnd
delete foobar
[Endtest]

//FIleSize startrange with value greater than the values of a file
//Input: FileSize as Key and 95000 as startrange
//Expected: should return errocode as 0 and empty list
[Test]
title All_Img_FileSizeKeyWithStartRange_NoExpectedo/p
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 95000 NULL NULL NULL 0 
delete foobar
[Endtest]

//GetList with FileDate StartRange
//Input: FileDate as Key and 20091019:033638 as value for startrange
//Expected: should return errocode as 0 and empty list
[Test]
title All_Img_FileDateWithStartRange_NoExpectedo/p
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileDate 20091019:033638 NULL NULL NULL 0 
delete foobar
[Endtest]

//GetList with negative FileSize StartRange
//Input: FileSize as Key and -12 as value for StartRange
//Expected: errorcode 1002- BadArgumentType as the value is out of range
[Test]
title All_ImgNeg_NegativeFileSize
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize -12 NULL NULL NULL 1002
delete foobar
[Endtest]


//GetList with negative FileDate StartRange
//Input: FileDate as Key and -12 as value for StartRange
//Expected: errorcode 1002- BadArgumentType as the value is out of range
[Test]
title All_Img_NegativeFileDate
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileDate -12 NULL NULL NULL 1002
delete foobar
[Endtest]


//GetList with FileDate StartRange
//Input: FileDate as Key and an invalid value 20093045:450990 as startrange
//Expected: errorcode 1002- BadArgumentType as the value is invalid
[Test]
title All_Img_InvalidFileDate
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileDate 20093045:450990 NULL NULL NULL 1002
delete foobar
[Endtest]

//GetList with no Key input, but with values for start and endrange
//Input: NULL as Key(no input for Key) and 70000 as StartRange and 80000 as endrange
//Expected: list of All image files
[Test]
title All_Img_NoFilterKeyWithStartRangeValues
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All NULL 70000 80000 NULL NULL 0
delete foobar
[Endtest]

//GetList with empty string StartRange for FileName
//Input: FileName as Key and empty string as value for StartRange
//Expected: 0 as errorcode and empty list
[Test]
title All_Img_EmptyStringStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileName "" NULL NULL NULL 0 
delete foobar
[Endtest]


//GetList with integer StartRange for FileName
//Input: FileName as Key and integer value 23 as value for StartRange
//Expected: 0 errocode and empty list is returned
[Test]
title All_Img_IntegerStartRangea
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileName 23 NULL NULL NULL 0
delete foobar
[Endtest]


//GetList with Null string as value for FileName
//Input: FileName as Key and null string "NULL" as value for startrange
//Expected: 0 errorcode and empty list
[Test]
title All_Img_FileNameKey_NullStringStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileName "NULL" NULL NULL NULL 0 
delete foobar
[Endtest]

//GetList with Null string as value for FileExtension
//Input: FileExtension as Key and null string "NULL" as value for startrange
//Expected: 0 errorcode and empty list
[Test]
title All_Img_FileExtensionKey_NullStringStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileExtension "NULL" NULL NULL NULL 0 
delete foobar
[Endtest]

//GetList with Null string as value for Drive
//Input: Drive as Key and null string "NULL" as value for startrange
//Expected: 0 errorcode and empty list
[Test]
title All_Img_DriveKey_NullStringStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive "NULL" NULL NULL NULL 0 
delete foobar
[Endtest]

//GetList with Null string as value for MimeType
//Input: MimeType as Key and null string "NULL" as value for startrange
//Expected: 0 errorcode and empty list
[Test]
title All_Img_MimeTypeKey_NullStringStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All MimeType "NULL" NULL NULL NULL 0 
delete foobar
[Endtest]

//GetList with Null string for FileNameAndPath
//Input: FileNameAndPath as Key and "Null" as value for StartRange
//Expected: 0 errorcode and empty list
[Test]
title All_Img_FileNameAndPathKey_NullStringStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileNameAndPath "NULL" NULL NULL NULL 0 
delete foobar
[Endtest]

#########################Type==“FileInfo” + Passing Filter Map with FileType==Image + Key+Start Range + End Range#############################

//GetList with FileSize end range less than start range
//Input: FileSize as key, 40000 as StartRange and 20000 as EndRange 
//Expected: 1002-BadArgumentType 
[Test]
title All_ImgNeg_StartRangeGTEndRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 40000 20000 NULL NULL 1002
delete foobar
[Endtest]

//GetList with Negative end range for FileSize 
//Input: FileSize as key, valid value of 200 for StartRange and a value -400 as value for EndRange
//Expected: 1002-BadArgumentType as the value of endrange is invalid and not within the range
[Test]
title All_ImgNeg_NegativeFileSizeEndRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 20000 -40000 NULL NULL 1002
delete foobar
[Endtest]

//GetList with Negative end range for FileDate 
//Input: FileDate as key, valid startrange and a value -400 as value for EndRange
//Expected: 1002-BadArgumentType as the value of endrange is invalid and not within the range
[Test]
title All_ImgNeg_NegativeFileDateEndRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileDate 20070920:053905 -400 NULL NULL 1002
delete foobar
[Endtest]

//GetList of images filtered by FileName with EndRange being mentioned
//Input: FileName as Key, value a as StartRange and value z as EndRange
//Expected: returns list based on StartRange alone and ignores the EndRange
[Test]
title All_Img_FileNameKeyWithStartAndEndRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileName a z NULL NULL 0 ExpectedStart StartMap FileName a EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList with valid start and end range for FileSize 
//Input: FileSize as key, valid value of 30000 for StartRange and a value 40000 as value for EndRange
//Expected: file with size in the range 30000 to 40000 is expected. FileName and FileSize is verified in the result
[Test]
title All_Img_FileSizeKeyWithValidRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 30000 40000 NULL NULL 0 ExpectedStart StartMap FileName a FileSize 31097 EndMap ExpectedEnd 
delete foobar
[Endtest]

//GetList with Negative end range for FileDate 
//Input: FileDate as key, valid startrange and a value -400 as value for EndRange
//Expected: 1002-BadArgumentType as the value of endrange is invalid and not within the range
[Test]
title All_Img_FileDateKeyWithValidRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileDate 20070920:053905 20071020:060000 NULL NULL 0 ExpectedStart StartMap FileName a FileDate 20070920:053905 EndMap ExpectedEnd 
delete foobar
[Endtest]

//GetList with valid start and end range for FileSize, but no such file is present in the expected list
//Input: FileSize as key, valid value of 95000 for StartRange and a value 98000 as value for EndRange
//Expected: file with size in the range 30000 to 40000 is expected.But no such file exists in the expected list
[Test]
title All_Img_FileSizeWithValidRange_WithNoExpectedOutput
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 95000 98000 NULL NULL 0 
delete foobar
[Endtest]

######################### Type==“FileInfo” + Passing Filter Map with FileType==Image + Sort Map#########################

//GetList of image file sorted in Ascending order of Drive
//Input: Drive as SortKey and Ascending as SortOrder, FileSize as Key with startrange of 20000 and 40000 as end range 
//Expected: list of images in ascending order of drive
[Test]
title All_Img_SortAscendingOnDrive
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 20000 40000 Drive Ascending 0 ExpectedStart StartMap FileName a Drive c: EndMap StartMap FileName stars Drive e: EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList of image file sorted in Descending order of Drive
//Input: Drive as SortKey and Descending as SortOrder, FileSize as Key with startrange of 20000 and 40000 as end range 
//Expected: list of images in descending order of drive
[Test]
title All_Img_SortDescendingOnDrive
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 20000 40000 Drive Descending 0 ExpectedStart StartMap FileName stars Drive e: EndMap StartMap FileName a Drive c: EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList of image file sorted in Ascending order of FileExtension
//Input: FileExtension as SortKey and Ascending as SortOrder, FileSize as Key with 4000 and 9000 start and end range values respectively
//Expected: list of images in ascending order of FileExtension
[Test]
title All_Img_SortAscendingOnFileExtension
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 4000 9000 FileExtension Ascending 0 ExpectedStart StartMap FileName ant FileExtension .jpg EndMap StartMap FileName blue FileExtension .png EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList of image file sorted in Descending order of FileExtension
//Input: FileExtension as SortKey and Descending as SortOrder, FileSize as Key with 4000 and 9000 start and end range values respectively
//Expected: list of images in descending order of FileExtension
[Test]
title All_Img_DescendingOnFileExtension
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 4000 9000 FileExtension Descending 0 ExpectedStart StartMap FileName blue FileExtension .png EndMap StartMap FileName ant FileExtension .jpg EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList of image files in Ascending order of MimeType
//Input: MimeType as SortKey and Ascending as SortOrder, FileSize as Key with 4000 and 9000 start and end range values respectively
//Expected: list of images in ascending order of MimeType
[Test]
title All_Img_SortAscendingOnMimeType
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 4000 9000 MimeType Ascending 0  ExpectedStart StartMap FileName ant MimeType image/jpeg EndMap StartMap FileName blue MimeType image/png EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList of image files in Descending order of MimeType
//Input: MimeType as SortKey and Descending as SortOrder, FileSize as Key with 4000 and 9000 start and end range values respectively
//Expected: list of images in descending order of MimeType
[Test]
title All_Img_SortDescendingOnMimeType
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 4000 9000 MimeType Descending 0 ExpectedStart StartMap FileName blue MimeType image/png EndMap StartMap FileName ant MimeType image/jpeg EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList of image files in Ascending order of FileSize 
//Input: FileSize as SortKey and Ascending as SortOrder
//Expected: list of images in ascending order of FileSize
[Test]
title All_Img_SortAscendingOnFileSize
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive c: NULL FileSize Ascending 0 ExpectedStart StartMap FileName blue FileSize 4796 EndMap StartMap FileName ant FileSize 8474 EndMap StartMap FileName a FileSize 31097 EndMap StartMap FileName dreams FileSize 73105 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList of image files in Descending order of FileSize 
//Input: FileSize as SortKey and Descending as SortOrder
//Expected: list of images in descending order of FileSize
[Test]
title All_Img_SortDescendingOnFileSize
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive c: NULL FileSize Descending 0 ExpectedStart StartMap FileName dreams FileSize 73105 EndMap StartMap FileName a FileSize 31097 EndMap StartMap FileName ant FileSize 8474 EndMap StartMap FileName blue FileSize 4796 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList of image files sorted in Ascending order of FileDate
//Input: FileDate as SortKey and Ascending as SortOrder,MimeType as FilterKey and image/jpeg as startvalue
//Expected: list of images in ascending order of FileDate
[Test]
title All_Img_SortAscendingOnMimeType
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All MimeType image/jpeg NULL FileDate Ascending 0 ExpectedStart StartMap FileName ant FileDate 20060819:102426 EndMap StartMap FileName a FileDate 20070920:053905 EndMap StartMap FileName stars FileDate 20081019:033638 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList of images sorted in Descending order based on FileDate
//Input: FileDate as SortKey and Descending as SortOrder
//Expected: list of images in descending order of FileDate,MimeType as FilterKey and image/jpeg as startvalue
[Test]
title All_SortDescendingOnMimeType
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All MimeType image/jpeg NULL FileDate Descending 0 ExpectedStart StartMap FileName stars FileDate 20081019:033638 EndMap StartMap FileName a FileDate 20070920:053905 EndMap StartMap FileName ant FileDate 20060819:102426 EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList with no SortOrder
//Input: Pass NULL as SortOrder and any valid SortKey like FileName
//Expected list of images in ascending order(default) based on SortKey(FileName) mentioned. The list is sorted in ascending order as Ascending is the default order
[Test]
title All_NoSortOrder
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive c: NULL FileName NULL 0 ExpectedStart StartMap FileName a EndMap StartMap FileName ant EndMap StartMap FileName blue EndMap StartMap FileName dreams EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList with Nokia as SortOrder
//Input: Nokia as value for SortOrder and any valid value eg.FileDate as value for SortKey
//Expected: 1002-BadArgumentType as Nokia is not a valid SortOrder
[Test]
title All_NokiaSortOrder
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All NULL NULL NULL FileDate Nokia 1002
delete foobar
[Endtest]


//GetList ascending(case sensitive) as sort order
//Input: lowercase "ascending" as value for SortOrder and FIleSize as value for SortKey
//Expected: list of images in ascending order, sorted based on Filesize
[Test]
title All_ascendingSortOrder
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive c: NULL FileSize ascending 0 ExpectedStart StartMap FileName blue FileSize 4796 EndMap StartMap FileName ant FileSize 8474 EndMap StartMap FileName a FileSize 31097 EndMap StartMap FileName dreams FileSize 73105 EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList with Ascending sort order for FileNameAndPath
//Input: FileNameAndPath as SortKey and Ascending as SortOrder
//Expected: list of image files in ascending order sorted based on FileNameAndPath
[Test]
title All_SortAscendingOnFileNameAndPath
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive c: NULL FileNameAndPath Ascending 0 ExpectedStart StartMap FileNameAndPath c:\data\Images\a.jpg EndMap StartMap FileNameAndPath c:\data\Images\ant.jpg EndMap StartMap FileNameAndPath c:\data\Images\blue.png EndMap StartMap FileNameAndPath c:\data\Images\pictures\dreams.bmp EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList with Descending order of files sorted based on FileName
//Input: FileName as SortKey and Descending as SortOrder
//Expected: list of images sorted in descending order based on FileName
[Test]
title All_SortDescendingOnFileName
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive c: NULL FileName Descending 0 ExpectedStart StartMap FileName dreams EndMap StartMap FileName blue EndMap StartMap FileName ant EndMap StartMap FileName a EndMap ExpectedEnd
delete foobar
[Endtest]


//Case to check for All fields in output
//Input: Drive as FilterKey, e: as startrange
//Expected: list of All images files in e: drive
[Test]
title All_DriveKey_e:StartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL NULL NULL 0 ExpectedStart StartMap Type Media FileName stars FileExtension .jpg Drive e: FileSize 24790 FileDate 20081019:033638 FileNameAndPath e:\data\Images\stars.jpg MimeType image/jpeg EndMap ExpectedEnd
delete foobar
[Endtest]



################################################################    Image Ends     ####################################################
//GetList of sound files with startrange for FileName
//Input: FileName as Key and value tempo as startrange, All other inputs are NULL(means no value is passed)
//Expected: list of sound files with filename tempo
[Test]
title All_Sound_FileNameKeyWithvalidStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileName tempo NULL NULL NULL 0 ExpectedStart StartMap FileName tempo EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList of sound files  with startrange for FileExtension
//Input: FileExtension as Key and value .wav as startrange, All other inputs are NULL(means no value is passed)
//Expected: list of All sound files with .wav as FileExtension are expected
[Test]
title All_Sound_FileExtensionKeyWithvalidStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileExtension .wav NULL NULL NULL 0 ExpectedStart StartMap FileName music FileExtension .wav EndMap StartMap FileName raaga FileExtension .wav EndMap StartMap FileName rock_on FileExtension .wav EndMap StartMap FileName tempo FileExtension .wav EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList of sound files with startrange for Drive
//Input: Drive as Key and value e: as startrange
//Expected: list of sound files filtered by Drive
[Test]
title All_Sound_DriveKey_e:StartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL NULL NULL 0 ExpectedStart StartMap FileName noise Drive e: EndMap StartMap FileName rock_on Drive e: EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList of sound files with startrange for FileSize
//Input: FileSize as Key and value 25301 as startrange
//Expected: list of sound files filtered by FileSize
[Test]
title All_Sound_FileSizeKeyWithvalidStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 25031 NULL NULL NULL 0 ExpectedStart StartMap FileName noise FileSize 25031 EndMap StartMap FileName sound FileSize 25031 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList of sound files with startrange for FileDate
//Input: FileDate as Key and value 20081109:085028 as startrange
//Expected: list of sound files filtered by FileDate
[Test]
title All_Sound_FileDateKeyWithvalidStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileDate 20081109:085028 NULL NULL NULL 0 ExpectedStart StartMap FileName noise FileDate 20081109:085028 EndMap StartMap FileName sound FileDate 20081109:085028 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList of sound files with startrange for MimeType
//Input: MimeType as Key and value AUDIO/WAV as startrange
//Expected: list of sound files filtered by MimeType
[Test]
title All_Sound_MimeTypeKey_audio/wavStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All MimeType AUDIO/WAV NULL NULL NULL 0 ExpectedStart StartMap FileName music MimeType AUDIO/WAV EndMap StartMap FileName raaga MimeType AUDIO/WAV EndMap StartMap FileName rock_on MimeType AUDIO/WAV EndMap StartMap FileName tempo MimeType AUDIO/WAV EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList of sound files with startrange for FileNameAndPath
//Input: FileNameAndPath as Key and value c:\data\sounds\digital\tempo.wav  as startrange
//Expected: list of sound files filtered by FileNameAndPath
[Test]
title All_Sound_FileNameAndPathKeyWithvalidStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileNameAndPath c:\data\sounds\digital\tempo.wav NULL NULL NULL 0 ExpectedStart StartMap FileNameAndPath c:\data\sounds\digital\tempo.wav EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList of sound files with negative startrange for FileSize
//Input: FileSize as key and -400 as value for startrange 
//Expected: errorcode 1002-BadArgumentType
[Test]
title All_SoundNeg_NegativeFileSize
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize -400 NULL NULL NULL 1002
delete foobar
[Endtest]

//GetList of sound files with negative startrange for FileDate
//Input: FileDate as key and -12 as value for startrange 
//Expected: errorcode 1002-BadArgumentType
[Test]
title All_SoundNeg_NegativeFileDate
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileDate -12 NULL NULL NULL 1002
delete foobar
[Endtest]

//GetList with FileSize with value more than the value of All files expected
//Input: FileSize as key and 40000 as value for startrange 
//Expected: errorcode 0 and empty list as output
[Test]
title All_Sound_ValidFileSize_NoExpectedo/p
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 40000 NULL NULL NULL 0
delete foobar
[Endtest]

//GetList with FileDate with value more than the value of aAll files expected
//Input: FileDate as key and 20091010:040404 as value for startrange 
//Expected: errorcode 0 and empty list as output
[Test]
title All_Sound_ValidFileDate_NoExpectedo/p
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileDate 20091010:040404 NULL NULL NULL 0
delete foobar
[Endtest]

//GetList with FileDate having invalid value
//Input: FileDate as key and 20094545:909834 as value for startrange 
//Expected: errorcode 1002- BadArgumentType
[Test]
title All_SoundNeg_InvalidFileDate
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileDate 20094545:909834 NULL NULL NULL 1002
delete foobar
[Endtest]

//GetList with startrange and no key
//Input: NULL as Key and 20000 and 30000 as start and end range values respectively
//Expected: list of All sound files is expected
[Test]
title All_Sound_NoKeyWithRangeValues
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All NULL 20000 30000 NULL NULL 0
delete foobar
[Endtest]


//GetList with empty string as startrange
//Input: FileName as Key and empty string as startrange
//Expected: errorcode 0 is returned and empty list is returned
[Test]
title All_Sound_FileNameKey_EmptyStringStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileName "" NULL NULL NULL 0 
delete foobar
[Endtest]

//GetList with integer as startrange
//Input: FileName as Key and integer value 12 as startrange
//Expected: errorcode 0 and empty list is returned
[Test]
title All_Sound_IntegerStartRangeForFileNameKey
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileName 12 NULL NULL NULL 0
delete foobar
[Endtest]


//GetList of sound files with a Null string as staratrange for FileName
//Input: FileName as Key and null string "NULL" as startrange
//Expected: errorcode 0 and empty list is returned
[Test]
title All_Sound_NullStringStartRangeForFileNameKey
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileName "NULL" NULL NULL NULL 0 
delete foobar
[Endtest]

//GetList of sound files with a Null string as staratrange for FileExtension
//Input: FileExtension as Key and null string "NULL" as startrange
//Expected: errorcode 0 and empty list is returned
[Test]
title All_Sound_NullStringStartRangeForFileExtensionKey
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileExtension "NULL" NULL NULL NULL 0 
delete foobar
[Endtest]

//GetList of sound files with a Null string as staratrange for Drive
//Input: Drive as Key and null string "NULL" as startrange
//Expected: errorcode 0 and empty list is returned
[Test]
title All_Sound_NullStringKeyForDriveKey
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive "NULL" NULL NULL NULL 0 
delete foobar
[Endtest]


//GetList of sound files with a Null string as staratrange for MimeType
//Input: MimeType as Key and null string "NULL" as startrange
//Expected: errorcode 0 and empty list is returned
[Test]
title All_Sound_NullStringStartRangeForMimeType
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All MimeType "NULL" NULL NULL NULL 0 
delete foobar
[Endtest]

//GetList of sound files with a Null string as staratrange for FileNameAndPath
//Input: FileNameAndPath as Key and null string "NULL" as startrange
//Expected: errorcode 0 and empty list is returned
[Test]
title All_Sound_NullStringStartRangeForFileNameAndPath
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileNameAndPath "NULL" NULL NULL NULL 0 
delete foobar
[Endtest]

################################# Type==“FileInfo” + Passing Filter Map with FileType==Sound + Key+Start Range + End Range ######################

//GetList of sound files with endrange less than startrange for FileSize
//Input: FileSize as Key and 22400 as startrange and 2000 as endrange
//Expected: errorcode 1002-BadArgumentType
[Test]
title All_SoundNeg_StartRangeGTEndRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 22400 2000 NULL NULL 1002
delete foobar
[Endtest]

//GetList of sound files with negative endrange for FileSize
//Input: FileSize as Key and -12 as value for endrange
//Expected: errorcode 1002-BadArgumentType
[Test]
title All_SoundNeg_NegativeFileSizeEndRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 22400 -12 NULL NULL 1002
delete foobar
[Endtest]

//GetList of sound files with negative endrange for FileDate
//Input: FileDate as Key and -24 as end range
//Expected: errorcode 1002-BadArgumentType
[Test]
title All_SoundNeg_NegativeFileDateEndRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileDate 20090103:075032 -24 NULL NULL 1002
delete foobar
[Endtest]

//GetList of sound files with endrange where it is not applicable
//Input: FileName as Key and raaga as startrange and tempo as endrange
//Expected: the details of file named raaga is expected and the endrange is ignored
[Test]
title All_Sound_EndRangeForFileNameKey
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileName raaga tempo NULL NULL 0 ExpectedStart StartMap FileName raaga EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with valid startrange for FileSize Key
//Input: FileSize as Key and 20000 and 25000 as start and end range values respectively
//Expected: list of All sound files in the file size range 20000 to 25000 is expected
[Test]
title All_Sound_ValidRangeForFileSize
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 20000 25000 NULL NULL 0 ExpectedStart StartMap FileName music FileSize 22965 EndMap StartMap FileName raaga FileSize 22965 EndMap StartMap FileName rock_on FileSize 22965 EndMap StartMap FileName tempo FileSize 22965 EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList with valid startrange for FileDate Key
//Input: FileDate as Key and 20081022:030000 and 20081110:090000 as start and end range values respectively
//Expected: list of All sound files in the file date range mentioned are expected
[Test]
title All_Sound_ValidRangeForFileDate
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileDate 20081022:030000 20081110:090000 NULL NULL 0 ExpectedStart StartMap FileName noise FileDate 20081109:085028 EndMap StartMap FileName sound FileDate 20081109:085028 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with valid startrange for FileSize Key, but no files being present in that range
//Input: FileSize as Key and 40000 and 50000 as start and end range values respectively
//Expected: 0 errorcode and empty list is expected
[Test]
title All_Sound_ValidRangeForFileSize_NoExpectedo/p
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 40000 50000 NULL NULL 0 
delete foobar
[Endtest]

########################  Type==“FileInfo” + Passing Filter Map with FileType==Sound + Sort Map ########################


//GetList with Ascending order for a given drive
//Input: FileExtension as Key .amr as startrange, Drive as SortKey and Ascending as SortOrder
//Expected: list of sound files with file extension .amr,in ascending order of drive
[Test]
title All_Sound_SortAscendingOnDrive
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileExtension .amr NULL Drive Ascending 0 ExpectedStart StartMap FileName sound Drive c: EndMap StartMap FileName noise Drive e: EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Descending order for a given drive
//Input: FileExtension as Key .amr as startrange, Drive as SortKey and Descending as SortOrder
//Expected: list of sound files with .amr file extension, in descending order of drive
[Test]
title All_Sound_SortDescendingOnDrive
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileExtension .amr NULL Drive Descending 0 ExpectedStart StartMap FileName noise FileExtension .amr Drive e: EndMap StartMap FileName sound FileExtension .amr Drive c: EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Ascending order for a given FileExtension
////Input: Drive as Key e: as startrange, FileExtension as SortKey and Ascending as SortOrder
//Expected: list of sound files, in e: drive, in ascending order of FileExtension
[Test]
title All_Sound_SortAscendingOnFileExtension
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL FileExtension Ascending 0 ExpectedStart StartMap FileName noise FileExtension .amr EndMap StartMap FileName rock_on FileExtension .wav EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Descending order for a given FileExtension
//Input: Drive as Key e: as startrange, FileExtension as SortKey and Descending as SortOrder
//Expected: list of sound files, in e: drive, in descending order of FileExtension
[Test]
title All_Sound_SortDescendingOnFileExtension
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL FileExtension Descending 0 ExpectedStart StartMap FileName rock_on FileExtension .wav EndMap StartMap FileName noise FileExtension .amr EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Ascending order for a given MimeType
//Input: Drive as Key, e: as value for startrange, MimeType as SortKey, Ascending as SortOrder
//Expected: list of sound files,in e: drive, in ascending order of MimeType
[Test]
title All_Sound_SortAscendingOnMimeType
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL MimeType Ascending 0 ExpectedStart StartMap FileName noise MimeType AUDIO/AMR EndMap StartMap FileName rock_on MimeType AUDIO/WAV EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Descending order for a given MimeType
//Input: Drive as Key, e: as value for startrange, MimeType as SortKey, Descending as SortOrder
//Expected: list of sound files,in e: drive, in descending order of MimeType
[Test]
title All_Sound_SortDescendingOnMimeType
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL MimeType Descending 0 ExpectedStart StartMap FileName rock_on MimeType AUDIO/WAV EndMap StartMap FileName noise MimeType AUDIO/AMR EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Ascending order for a given FileSize
//Input: Drive as Key, e: as value for startrange, FileSize as SortKey, Ascending as SortOrder
//Expected: list of sound files,in e: drive, in ascending order of FileSize
[Test]
title All_Sound_SortAscendingOnFileSize
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL FileSize Ascending 0 ExpectedStart StartMap FileName rock_on FileSize 22965 EndMap StartMap FileName noise FileSize 25031 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Descending order for a given FileSize
//Input: Drive as Key, e: as value for startrange, FileSize as SortKey, Descending as SortOrder
//Expected: list of sound files in descending order of FileSize
[Test]
title All_Sound_SortDescendingOnFileSize
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL FileSize Descending 0 ExpectedStart StartMap FileName noise FileSize 25031 EndMap StartMap FileName rock_on FileSize 22965 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Ascending order for a given FileDate
//Input: Drive as Key, e: as value for startrange, FileDate as SortKey, Ascending as SortOrder
//Expected: list of sound files,in e: drive, in ascending order of FileDate
[Test]
title All_Sound_SortAscendingOnFileDate
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL FileDate Ascending 0 ExpectedStart StartMap FileName rock_on FileDate 20081019:033638 EndMap StartMap FileName noise FileDate 20081109:085028 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Descending order for a given FileDate
//Input: Drive as Key, e: as value for startrange, FileDate as SortKey, Descending as SortOrder
//Expected: list of sound files,in e: drive, in descending order of FileDate
[Test]
title All_Sound_SortDescendingOnFileDate
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL FileDate Descending 0 ExpectedStart StartMap FileName noise FileDate 20081109:085028 EndMap StartMap FileName rock_on FileDate 20081019:033638 EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList with no sort order 
//Input: Drive as Key, e: as value for startrange, FileName as SortKey, no sortorder(NULL as sortorder)
//Expected: list of sound files,in e: drive, in ascending order(default order) of FileName
[Test]
title All_Sound_NoSortOrder
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL FileName NULL 0 ExpectedStart StartMap FileName noise EndMap StartMap FileName rock_on EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList Nokia as SortOrder
//Input: FileDate as SortKey and Nokia as SortOrder
//Expected: errorcode 1002-BadArgumentType is expected output, as the value for SortOrder is invalid
[Test]
title All_Sound_NokiaSortOrder
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All NULL NULL NULL FileDate Nokia 1002
delete foobar
[Endtest]


//GetList ascending(case sensitive) as sort order
//Input: Drive as Key, e: as value for startrange, FileDate as value for SortKey and ascending(lower case) as value for SortOrder
//filters as per the filter key and order mentioned
[Test]
title All_Sound_lowercase_ascendingSortOrder
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL FileDate ascending 0 ExpectedStart StartMap FileName rock_on FileDate 20081019:033638 EndMap StartMap FileName noise FileDate 20081109:085028 EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList Ascending sort order for FileNameAndPath
//Input: FileNameAndPath as SortKey and Ascending as SortOrder
//Expected: list of sound files in ascending order of FileNameAndPath
[Test]
title All_Sound_SortAscendingOnFileNameAndPath
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive c: NULL FileNameAndPath Ascending 0 ExpectedStart StartMap FileNameAndPath c:\data\others\music.wav EndMap StartMap FileNameAndPath c:\data\sounds\digital\raaga.wav EndMap StartMap FileNameAndPath c:\data\sounds\digital\sound.amr EndMap StartMap FileNameAndPath c:\data\sounds\digital\tempo.wav EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList Descending order for FileName
//Input: FileName as SortKey and Descending as value for SortOrder
//Expected: list of sound files in descending order of FileName
[Test]
title All_Sound_SortDescendingOnFileName
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All MimeType AUDIO/AMR NULL FileName Descending 0 ExpectedStart StartMap FileName sound MimeType AUDIO/AMR EndMap StartMap FileName noise MimeType AUDIO/AMR EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList to check for All fields
//Input: Drive as FilterKey and e: as startrange FileName as SortKey and Descending as value for SortOrder
//Expected: list of sound files in e: drive, in descending order of FileName
[Test]
title All_Sound_DriveKey_e:StartRange_CheckForAllKeysInExpectedO/p
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL FileName Descending 0 ExpectedStart StartMap Type Media FileName rock_on FileExtension .wav Drive e: FileSize 22965 FileDate 20081019:033638 FileNameAndPath e:\data\sounds\digital\rock_on.wav MimeType AUDIO/WAV EndMap StarMap Type Media FileName noise FileExtension .amr Drive e: FileSize 25031 FileDate 20081109:085028 FileNameAndPath e:\data\sounds\digital\noise.amr MimeType AUDIO/AMR EndMap ExpectedEnd
delete foobar
[Endtest]

############################################ End Sound #################################################

//GetList of video files with startrange for FileName
//Input: FileName as Key and video1 as startrange
//Expected: list of video files filtered by FileName. Thus details of All files named video1 is expected as o/p
[Test]
title All_video_WithValidFileNameStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileName video1 NULL NULL NULL 0 ExpectedStart StartMap FileName video1 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList of video files  with startrange for FileExtension
//Input: FileExtension as Key and .3gp as startrange
//Expected: list of video files filtered by FileExtension. All files with extension .3gp is expected
[Test]
title All_video_WithValidFileExtensionStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileExtension .3gp NULL NULL NULL 0 ExpectedStart StartMap FileName video2 FileExtension .3gp EndMap StartMap FileName video5 FileExtension .3gp EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList of video files with startrange for Drive 
//Input: Drive as Key and e: as startrange
//Expected: list of video files filtered by Drive. Details of All files in e: drive is expected
[Test]
title All_video_DriveKey_e:StartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL NULL NULL 0 ExpectedStart StartMap FileName video2 Drive e: EndMap StartMap FileName video3 Drive e: EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList of video files with startrange for FileSize
//Input: FileSize as Key and 71599 as startrange
//Expected: list of video files filtered by FileSize. Details of All files with size 71599 is expected o/p
[Test]
title All_video_WithValidFileSizeStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 71559 NULL NULL NULL 0 ExpectedStart StartMap FileName video1 FileSize 71559 EndMap StartMap FileName video2 FileSize 71559 EndMap StartMap FileName video5 FileSize 71559 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList of video files with startrange for FileDate
//Input: FileDate as Key and 20081019:033638 as startrange
///Expected: list of video files filtered by FileDate. All files with date 20081019:033638 is expected as o/p
[Test]
title All_video_WithValidFileDateStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileDate 20081019:033638 NULL NULL NULL 0 ExpectedStart StartMap FileName video1 FileDate 20081019:033638 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList of video files with startrange for MimeType
//Input: MimeType as Key and video/3gpp as startrange
//Expected: list of video files filtered by MimeType. All files with MimeType as video/3gpp is expected 
[Test]
title All_video_WithValidMimeTypeStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All MimeType Video/3gpp NULL NULL NULL 0 ExpectedStart StartMap FileName video2 MimeType VIDEO/3GPP EndMap StartMap FileName video5 MimeType VIDEO/3GPP EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList of video files with startrange for FileNameAndPath
//Input: FileNameAndPath as Key and c:\data\videos\video1.mp4 as startrange
//Expected: list of video files filtered by FileNameAndPath. All files with path c:\data\videos\video1.mp4 are the expected o/p
[Test]
title All_video_WithValidFileNameAndPathStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileNameAndPath c:\data\videos\video1.mp4 NULL NULL NULL 0 ExpectedStart StartMap FileNameAndPath c:\data\Videos\video1.mp4 EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList of video files with negative startrange for FileSize
//Input: FileSize as Key and a negative value -400 as startrange
//Expected: errorcode 1002-BadArgumentType
[Test]
title All_videoNeg_WithNegativeFileSizeStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize -400 NULL NULL NULL 1002
delete foobar
[Endtest]

//GetList of video files with negative startrange for FileDate
//Input: FileDate as Key and a negative value -12 as startrange
//Expected: errorcode 1002-BadArgumentType
[Test]
title All_videoNeg_WithNegativeFileDateStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileDate -12 NULL NULL NULL 1002
delete foobar
[Endtest]

//GetList of video files with startrange for FileSize such that no files with that value exists
//Input: FileSize as Key and a valid value 2000000 as startrange
//Expected: errorcode 0 and empty list is expected
[Test]
title All_video_WithValidFileSizeSartRange_NoExpectedO/p
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 2000000 NULL NULL NULL 0
delete foobar
[Endtest]

//GetList of video files with startrange for FileDate such that no files with that value exists
//Input: FileDate as Key and a value 20090201:050000 as startrange
//Expected: errorcode 0 and empty list is expected
[Test]
title All_video_WithVsalidFileDate_NoExpectedO/p
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileDate 20090201:050000 NULL NULL NULL 0
delete foobar
[Endtest]


//GetList of video files with invalid value for startrange for FileDate 
//Input: FileDate as Key and a value 20094545:909834 as startrange
//Expected: errorcode 1002-BadArgumentType
[Test]
title All_videoNeg_InvalidFileDate
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileDate 20094545:909834 NULL NULL NULL 1002
delete foobar
[Endtest]

//GetList with startrange and no key
//Input: NULL as Key and 20000 and 30000 as start and end range values respectively
//Expected: list of All video files is expected
[Test]
title All_video_NullKey
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All NULL 20000 30000 NULL NULL 0
delete foobar
[Endtest]


//GetList with empty string as startrange
//Input: FileName as Key and empty string as startrange
//Expected: errorcode 0 is returned and empty list is returned
[Test]
title All_video_EmptyStringStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileName "" NULL NULL NULL 0 
delete foobar
[Endtest]

//GetList with integer as startrange
//Input: FileName as Key and integer value 12 as startrange
//Expected: errorcode 0 and empty list is returned
[Test]
title All_video_IntegerFileName
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileName 12 NULL NULL NULL 0
delete foobar
[Endtest]


//GetList of video files with a Null string as startrange for FileName
//Input: FileName as Key and a null string "NULL" as startrange
//Expected: errorcode 0 and empty list, as the file named NULL may not be present in the list
[Test]
title All_video_FileNameKey_NullStringStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileName "NULL" NULL NULL NULL 0 //1002
delete foobar
[Endtest]

//GetList of video files with a Null string as startrange for FileExtension
//Input: FileExtension as Key and a null string "NULL" as startrange
//Expected: errorcode 0 and empty list
[Test]
title All_video_FileExtensionKey_NullStringStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileExtension "NULL" NULL NULL NULL 0 //1002
delete foobar
[Endtest]

//GetList of video files with a Null string as startrange for Drive
//Input: Drive as Key and a null string "NULL" as startrange
//Expected: errorcode 0 and empty list
[Test]
title All_video_DriveKey_NullStringStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive "NULL" NULL NULL NULL 0 //1002
delete foobar
[Endtest]


//GetList of video files with a Null string as startrange for MimeType
//Input: MimeType as Key and a null string "NULL" as startrange
//Expected: errorcode 0 and empty list
[Test]
title All_video_MimeTypeKey__NullStringStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All MimeType "NULL" NULL NULL NULL 0 // 1002
delete foobar
[Endtest]

//GetList of video files with a Null string as startrange for FileNameAndPath
//Input: FileNameAndPath as Key and a null string "NULL" as startrange
//Expected: errorcode 0 and empty list
[Test]
title All_video_FileNameAndPathKey_NullStringStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileNameAndPath "NULL" NULL NULL NULL 0 //1002
delete foobar
[Endtest]

################################# Type==“FileInfo” + Passing Filter Map with FileType==video + Key+Start Range + End Range ######################

//GetList of video files with endrange less than startrange for FileSize
//Input: FileSize as Key, 70000 as startrange and 20000 (<startrange) as endrange value
//Expected: errorcode 1002-BadArgumentType
[Test]
title All_video_StartRangeGTEndRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 70000 20000 NULL NULL 1002
delete foobar
[Endtest]

//GetList of video files with negative endrange for FileSize
//Input: FileSize as Key and 70000 as startrange and a negative value -12 as endrange
//Expected: errorcode 1002-BadArgumentType
[Test]
title All_videoNeg_NegativeFileSize
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 70000 -12 NULL NULL 1002
delete foobar
[Endtest]

//GetList of video files with negative endrange for FileDate
//Input: FileDate as Key and 20090103:094451 as startrange and a negative value -24 as endrange
//Expected: errorcode 1002-BadArgumentType
[Test]
title All_videoNeg_NegativeFileDate
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileDate 20090103:094451 -24 NULL NULL 1002
delete foobar
[Endtest]

//GetList of video files with endrange where it is not applicable
//Input: FileName as Key and video2 as startrange and video4 as endrange
//Expected: the details of file named video2 is expected and the endrange is ignored
[Test]
title All_video_EndRangeForFileNameKey
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileName video2 video4 NULL NULL 0 ExpectedStart StartMap FileName video2 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with valid startrange for FileSize Key
//Input: FileSize as Key and 70000 and 80000 as start and end range values respectively
//Expected: list of All video files in the range of file size 70000 to 80000 is expected
[Test]
title All_video_ValidFileSizeRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 70000 80000 NULL NULL 0 ExpectedStart StartMap FileName video1 FileSize 71559 EndMap StartMap FileName video2 FileSize 71559 EndMap StartMap FileName video5 FileSize 71559 EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList with valid startrange for FileDate Key
//Input: FileDate as Key and 20060000:030000 and 20061111:090000 as start and end range values respectively
//Expected: list of All video files in the filedate range mentioned are expected
[Test]
title All_video_ValidFileDateRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileDate 20060000:030000 20061111:090000 NULL NULL 0 ExpectedStart StartMap FileName video3 FileDate 20060604:070320 EndMap StartMap FileName video4 FileDate 20060711:044818 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with valid startrange for FileSize Key, but no files being present in that range
//Input: FileSize as Key and 40000 and 50000 as start and end range values respectively
//Expected: errorcode 0 and empty output list is expected
[Test]
title All_video_ValidFileSizeRange_NoExpectedO/p
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 40000 50000 NULL NULL 0 
delete foobar
[Endtest]



########################  Type==“FileInfo” + Passing Filter Map with FileType==video + Sort Map ########################


//GetList with Ascending order for a given drive
//Input: FileExtension as Key, .3gp as startrange, Drive as SortKey and Ascending as SortOrder.
//Expected: list of video files with extension .3gp are sorted in ascending order of their drive.
[Test]
title All_video_SortAscendingOnDrive
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileExtension .3gp NULL Drive Ascending 0 ExpectedStart StartMap FileName video5 Drive c: EndMap StartMap FileName video2 Drive e: EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Descending order for a given drive
//Input: FileExtension as Key, .3gp as startrange, Drive as SortKey and Descending as SortOrder.
//Expected: list of video files with extension .3gp are sorted in descending order of their drive.
[Test]
title All_video_SortDescendingOnDrive
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileExtension .3gp NULL Drive Descending 0 ExpectedStart StartMap FileName video2 Drive e: EndMap StartMap FileName video5 Drive c: EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Ascending order for a given FileExtension
//Input: Drive as Key, e: as startrange, FileExtension as SortKey and Ascending as SortOrder.
//Expected: list of video files in e: drive are sorted in ascending order by their file extension
[Test]
title All_video_SortAscendingOnFileExtension
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL FileExtension Ascending 0 ExpectedStart StartMap FileName video2 FileExtension .3gp Drive e: EndMap StartMap FileName video3 FileExtension .mp4 Drive e: EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Descending order for a given FileExtension
//Input: Drive as Key, e: as startrange, FileExtension as SortKey and Descending as SortOrder.
//Expected: list of video files in e: drive are sorted in descending order by their file extension
[Test]
title All_video_SortDescendingOnFileExtension
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL FileExtension Descending 0 ExpectedStart StartMap FileName video3 FileExtension .mp4 EndMap StartMap FileName video2 FileExtension .3gp EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Ascending order for a given MimeType
//Input: Drive as Key, e: as startrange, MimeType as SortKey and Ascending as SortOrder.
//Expected: list of video files in e: drive are sorted in ascending order by their MimeType
[Test]
title All_video_SortAscendingOnMimeType
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL MimeType Ascending 0 ExpectedStart StartMap FileName video2 MimeType VIDEO/3GPP EndMap StartMap FileName video3 MimeType VIDEO/MP4 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Descending order for a given MimeType
//Input: Drive as Key, e: as startrange, MimeType as SortKey and Descending as SortOrder.
//Expected: list of video files in e: drive are sorted in descending order by their MimeType
[Test]
title All_video_SortDescendingOnMimeType
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL MimeType Descending 0 ExpectedStart StartMap FileName video3 MimeType VIDEO/MP4 EndMap StartMap FileName video2 MimeType VIDEO/3GPP EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Ascending order for a given FileSize
//Input: Drive as Key, e: as startrange, FileSize as SortKey and Ascending as SortOrder.
//Expected: list of video files in e: drive sorted in ascending order of their FileSize
[Test]
title All_video_SortAscendingOnFileSize
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL FileSize Ascending 0 ExpectedStart StartMap FileName video2 FileSize 71559 EndMap StartMap FileName video3 FileSize 1141811 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Descending order for a given FileSize
//Input: Drive as Key, e: as startrange, FileSize as SortKey and Descending as SortOrder.
//Expected: list of video files in e: drive, sorted in descending order of their FileSize
[Test]
title All_video_SortDescendingOnFileSize
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL FileSize Descending 0 ExpectedStart StartMap FileName video3 FileSize 1141811 EndMap StartMap FileName video2 FileSize 71559 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Ascending order for a given FileDate
//Input: Drive as Key, e: as startrange, FileDate as SortKey and Ascending as SortOrder.
//Expected: list of video files sorted in ascending order by FileDate
[Test]
title All_video_SortAscendingOnFileDate
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL FileDate Ascending 0 ExpectedStart StartMap FileName video3 FileDate 20060604:070320 EndMap StartMap FileName video2 FileDate 20081019:033638 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Descending order for a given FileDate
//Input: FileSize as Key, 1100000 as startrange, 1200000 as endrange, FileDate as SortKey and Descending as SortOrder.
//Expected: list of video files with size between the range (1100000,1200000), sorted in descending order of their FileDate
[Test]
title All_video_SortDescendingOnFileDate
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 1100000 1200000 FileDate Descending 0 ExpectedStart StartMap FileName video4 FileDate 20060711:044818 EndMap StartMap FileName video3 FileDate 20060604:070320 EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList with no sort order 
//Input: Drive as Key, e: as value for startrange, FileName as SortKey, no sortorder(NULL as sortorder)
//Expected: list of video files,in e: drive, in ascending order(default order) of FileName
[Test]
title All_video_NoSortOrder
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL FileName NULL 0 ExpectedStart StartMap FileName video2 EndMap StartMap FileName video3 EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList Nokia as SortOrder
//Input: FileDate as SortKey and Nokia as SortOrder
//Expected: errorcode 1002-BadArgumentType, as Nokia is invalid SortOrder
[Test]
title All_video_NokiaSortOrder
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All NULL NULL NULL FileDate Nokia 1002
delete foobar
[Endtest]


//GetList ascending(case sensitive) as sort order
//Input: FileSize as Key, 1100000 as startrange, 1200000 as endrange, FileDate as SortKey and ascending(lowercase) as SortOrder.
//Expected: list of video files with size between the range (1100000,1200000), sorted in descending order of their FileDate
[Test]
title All_video_SortascendingOnFileName
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All FileSize 1100000 1200000 FileName ascending 0 ExpectedStart StartMap FileName video3 EndMap StartMap FileName video4 EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList Ascending sort order for FileNameAndPath
//Input: FileNameAndPath as SortKey and Ascending as SortOrder
//Expected: list of video files sorted in ascending order of their FileNameAndPath
[Test]
title All_video_SortAscendingOnFileNameAndPath
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive c: NULL FileNameAndPath Ascending 0 ExpectedStart StartMap FileNameAndPath c:\data\Others\video4.mp4 EndMap StartMap FileNameAndPath c:\data\Videos\video1.mp4 EndMap StartMap FileNameAndPath c:\data\Videos\video5.3gp EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList Descending order for FileName
//Input: FileName as SortKey and Descending as SortOrder
//Expected: list of video files sorted in descending order of their FileName
[Test]
title All_video_SortDescendingOnFileName
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive c: NULL FileName Descending 0 ExpectedStart StartMap FileName video5 EndMap StartMap FileName video4 EndMap StartMap FileName video1 EndMap ExpectedEnd
delete foobar
[Endtest]



//GetList case to check for All fields
//Input: Drive as FilterKey e: as startrange, All other values are not passed
//Expected: list of All All files in e: drive, sorted in ascending order of their FileName is expected
[Test]
title All_video_DriveKey_e:StartRange_CheckAllKeys
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo All Drive e: NULL NULL NULL 0 ExpectedStart StartMap Type Media FileName video2 FileExtension .3gp Drive e: FileSize 71559 FileDate 20081019:033638 FileNameAndPath e:\data\Videos\video2.3gp MimeType VIDEO/3GPP EndMap StartMap Type Media FileName video3 FileExtension .mp4 Drive e: FileSize 1141811 FileDate 20060604:070320 FileNameAndPath e:\data\Videos\video3.mp4 MimeType VIDEO/MP4 EndMap ExpectedEnd
delete foobar
[Endtest]

############################################################################################################################################################################