########################################################################## Music file #####################################################################
/*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.

Assumptions/requisites: 
The following music files are expected to be present at the mentioned locations. All the cases below are written based on these files being present.
The expected output is as per this list.

FileNameAndPath:											Expected o/p format for each file:
c:\data\sounds\digital\music1.mp3			StartMap Type Media FileName music1 FileExtension .mp3 Drive c: FileSize 29056 FileDate 20090116:091802 FileNameAndPath c:\data\sounds\digital\music1.mp3 MimeType AUDIO/MPEG SongName music1.mp3 Artist Lata Album Album2 TrackNumber 1 Genre Rock Composer Anu EndMap 
c:\data\sounds\digital\music2.mp3			StartMap Type Media FileName music2 FileExtension .mp3 Drive c: FileSize 17536 FileDate 20090117:091804 FileNameAndPath c:\data\sounds\digital\music2.mp3 MimeType AUDIO/MPEG SongName music2.mp3 Artist Rafi Album Shaheed TrackNumber 2 Genre Classical Composer Dhawan EndMap 
c:\data\others\music3.mp3							StartMap Type Media FileName music3 FileExtension .mp3 Drive c: FileSize 434288 FileDate 20090117:090854 FileNameAndPath c:\data\others\music3.mp3 MimeType AUDIO/MPEG SongName music3.mp3 Artist Sonu Album Album1 TrackNumber 3 Genre Classical Composer Rahman EndMap 
e:\data\sounds\digital\music4.mp3			StartMap Type Media FileName music4 FileExtension .mp3 Drive e: FileSize 434288 FileDate 20090117:111341 FileNameAndPath e:\data\sounds\digital\music4.mp3 MimeType AUDIO/MPEG SongName music4.mp3 Artist Kk Album Album2 TrackNumber 4 Genre Rock Composer Malik EndMap 
e:\data\sounds\digital\music5.rm      StartMap Type Media FileName music5 FileExtension .rm Drive e: FileSize 1381291 FileDate 20090103:033223 FileNameAndPath e:\data\sounds\digital\music5.rm MimeType audio/x-pn-realaudio SongName music5.rm Artist Shreya Album Album3 TrackNumber 5 Genre Classical Composer Rahman 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> <FileName> <FileExtension> <Drive> <FileSize> <FileDate> <FileNameAndPath> <MimeType> <SongName> <Artist> <Album> <TrackNumber> <Genre> <Composer> Next/End
foobar GetFilesListL FileInfo Music FileName music1 NULL NULL NULL 0 Expected Media music1 .mp3 c: 271890 20090006:031914 c:\data\sounds\digital\music1.mp3 AUDIO/MPEG music1.mp3 Lata Album2 1 Rock Anu EndMap ExpectedEnd 
delete foobar
[Endtest]

*/


###################################################################### Test cases starts ########################################################################

//GetList of music 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 musicNeg_FileNameKeywithNoStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo Music FileName NULL NULL NULL NULL 1003  
delete foobar
[Endtest]


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

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


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

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

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

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


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


//GetList with startrange for FileName
//Input: FileName as Key, music1 as startrange
//Expected: list of music files with FileName music1, sorted in ascending order based on FileName, which is the default sort key and order
[Test]
title music_FileNameKeyWithValidStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo Music FileName music1 NULL NULL NULL 0 ExpectedStart StartMap FileName music1 EndMap ExpectedEnd 
//foobar GetFilesListL FileInfo Music FileName music5 NULL NULL NULL 0 ExpectedStart StartMap FileName music5 FileExtension .rm Drive e: FileSize 1381291 FileDate 20090103:033223 FileNameAndPath e:\data\sounds\digital\music5.rm MimeType audio/x-pn-realaudio SongName music5.rm Artist Shreya Album Album3 TrackNumber 5 Genre Classical Composer Rahman EndMap ExpectedEnd //StartMap FileName music1 EndMap ExpectedEnd 
delete foobar
[Endtest]

//GetList of music files by MimeType
//Input: MimeType as Key, AUDIO/MPEG as startrange 
//Expected: list of music files with MimeType AUDIO/MPEG are expected
[Test]
title music_MimeTypeKey_Audio/mpegStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo Music 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 music files by FileNameAndPath
//Input: FileNameAndPath as Key and c:\data\sounds\digital\music2.mp3 as startrange
//Expected: list of music files with file path c:\data\sounds\digital\music2.mp3 is expected
[Test]
title music_FileNameAndPathKey_WithValidStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo Music 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 music files by key SongName
//Input: SongName as Key and music1 as startrange
//Expected: list of music files with SongName as music1 is expected
[Test]
title music_SongNameKey_music1.mp3StartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo Music SongName music1.mp3 NULL NULL NULL 0 ExpectedStart StartMap FileName music1 SongName music1.mp3 EndMap ExpectedEnd
delete foobar
[Endtest]


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


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

/*
 //This case is removed as we are not able to get TrackNumber field from the underlying framework
//A bug with ID: RCHA-7N2938 has been raised for the same
//GetList of music files by key TrackNumber
//Input: TrackNumber as Key and 3 as value for startrange
//Expected: list of music files with 3 as TrackNumber
[Test]
title music_TrackNumberKeyWithValidStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo Music TrackNumber 3 NULL NULL NULL 0 ExpectedStart StartMap FileName music3 TrackNumber 3 EndMap ExpectedEnd
delete foobar
[Endtest]
*/


//GetList of music files by key Genre
//Input: Genre as Key and Rock as startrange
//Expected: list of music files with Genre as Rock is expected
[Test]
title music_GenreKeyWithValidStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo Music 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 music files by key Composer
//Input: Composer as Key and malik as startrange
//Expected: list of music with Composer as Malik
[Test]
title music_ComposerKeyWithValidStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo Music 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 music_FileNameAndPathKey_NullStringStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo Music 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 music files with this name
[Test]
title music_IntegerStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo Music FileName 12 NULL NULL NULL 0 
delete foobar
[Endtest]


#####################################  Type==“FileInfo” + Passing Filter Map with FileType==Music + 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 music_SortAscendingOnDrive
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo music 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 music_SortDescendingOnDrive
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo music 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 music_SortAscendingOnFileExtension
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo music 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 music_SortDescendingOnFileExtension
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo music 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 music_SortAscendingOnMimeType
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo music 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 music_SortDescendingOnMimeType
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo music 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 music_SortAscendingOnFileSize
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo music 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 music_SortDescendingOnFileSize
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo music 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 music_SortAscendingOnFileDate
create tmediaprovidertesting foobar
//foobar GetFilesListL FileInfo music Genre Classical NULL FileDate Ascending 0 ExpectedStart StartMap FileName music2 FileDate 20090006:052103 EndMap StartMap FileName music3 FileDate 20090028:010527 EndMap StartMap FileName music5 FileDate 20090103:100223 EndMap ExpectedEnd //org
foobar GetFilesListL FileInfo music 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 music_SortDescendingOnFileDate
create tmediaprovidertesting foobar
//foobar GetFilesListL FileInfo music Genre Classical NULL FileDate Descending 0 ExpectedStart StartMap FileName music5 FileDate 20090103:100223 EndMap StartMap FileName music3 FileDate 20090028:010527 EndMap StartMap FileName music2 FileDate 20090006:052103 EndMap ExpectedEnd //org
foobar GetFilesListL FileInfo music 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 music_SortAscendingOnArtist
create tmediaprovidertesting foobar
//foobar GetFilesListL FileInfo music Drive e: NULL Artist Ascending 0 ExpectedStart StartMap FileName music4 Artist Kk EndMap StartMap FileName music5 Artist Shreya EndMap ExpectedEnd //org
foobar GetFilesListL FileInfo music 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 music_SortDescendingOnArtist
create tmediaprovidertesting foobar
//foobar GetFilesListL FileInfo music Drive e: NULL Artist Descending 0 ExpectedStart StartMap FileName music5 Artist Shreya EndMap StartMap FileName music4 Artist Kk EndMap ExpectedEnd //org
foobar GetFilesListL FileInfo music 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 music_SortAscendingOnGenre
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo music 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 music_SortDescendingOnGenre
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo music 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 music_SortAscendingOnComposer
create tmediaprovidertesting foobar
//foobar GetFilesListL FileInfo music Drive e: NULL Composer Ascending 0 ExpectedStart StartMap FileName music4 Composer Malik EndMap StartMap FileName music5 Composer Rahman EndMap ExpectedEnd //org
foobar GetFilesListL FileInfo music 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 music_SortDescendingOnComposer
create tmediaprovidertesting foobar
//foobar GetFilesListL FileInfo music Drive e: NULL Composer Descending 0 ExpectedStart StartMap FileName music5 Composer Rahman EndMap StartMap FileName music4 Composer Malik EndMap ExpectedEnd //org
foobar GetFilesListL FileInfo music 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 music_SortAscendingOnAlbum
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo music 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]

/*
 //This case is removed as we are not able to get TrackNumber field from the underlying framework
//A bug with ID: RCHA-7N2938 has been raised for the same
//GetList with Descending order for a given TrackNumber
//Input: TrackNumber as SortKey and Descending as SortOrder
//Expected: list of music files sorted in descending order based on TrackNumber
[Test]
title music_SortDescendingOnTrackNumber
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo music Drive c: NULL TrackNumber Descending 0 ExpectedStart StartMap FileName music3 TrackNumber 3 EndMap StartMap FileName music2 TrackNumber 2 EndMap StartMap FileName music1 TrackNumber 1 EndMap ExpectedEnd
delete foobar
[Endtest]*/


//GetList Nokia as SortOrder
//Input: FileDate as SortKey and Nokia as SortOrder
//Expected: errorcode 1002-BadArgumentType
[Test]
title musicNeg_NokiaSortOrder
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo music 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 music_WithLowercaseascendingAsSortOrder
create tmediaprovidertesting foobar
//foobar GetFilesListL FileInfo music Genre Classical NULL FileDate ascending 0 ExpectedStart StartMap FileName music2 FileDate 20090006:052103 EndMap StartMap FileName music3 FileDate 20090028:010527 EndMap StartMap FileName music5 FileDate 20090103:100223 EndMap ExpectedEnd //org
foobar GetFilesListL FileInfo music 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 music_SortAscendingOnFileNameAndPath
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo music 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 music_SortDescendingOnFileName
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo music Drive c: NULL FileName Descending 0 ExpectedStart StartMap FileName music3 EndMap StartMap FileName music2 EndMap StartMap FileName music1 EndMap ExpectedEnd
delete foobar
[Endtest]

/*
// This case is removed as we are not able to get SongName and TrackNumber fields from the underlying framework for .mp3 files.
//Also for a .rm file,we are not able to get Artist, Album, SongName, TrackNumber, Composer and Genre fields. 
//A bug with ID: RCHA-7N2938 has been raised for the same


//GetList case to check for all fields in output
//Input: Drive as FilterKey, e: as startrange, no other inputs
//Expected: list of all music files present in e: drive is returned
[Test]
title music_DriveKey_c:StartRange_CheckAllFieldsInO/p
create tmediaprovidertesting foobar
//foobar GetFilesListL FileInfo Music Drive e: NULL NULL NULL 0 ExpectedStart StartMap Type Media FileName music4 FileExtension .mp3 Drive e: FileNameAndPath e:\data\sounds\digital\music4.mp3 MimeType AUDIO/MPEG SongName music4.mp3 Artist Kk Album Album2 TrackNumber 4 Genre Rock Composer Malik EndMap StartMap Type Media FileName music5 FileExtension .rm Drive e: FileNameAndPath e:\data\sounds\digital\music5.rm MimeType audio/x-pn-realaudio SongName music5.rm Artist Shreya Album Album3 TrackNumber 5 Genre Classical EndMap ExpectedEnd // Org FileSize 5032314 FileDate 20090104:033223 FileSize 1381291 FileDate 20090103:100223 Composer Rahman 
foobar GetFilesListL FileInfo Music Drive c: NULL NULL NULL 0 ExpectedStart StartMap Type Media FileName music1 FileExtension .mp3 Drive c: FileSize 29056 FileDate 20090116:091802 FileNameAndPath c:\data\sounds\digital\music1.mp3 MimeType AUDIO/MPEG SongName music1.mp3 Artist Lata Album Album2 TrackNumber 1 Genre Rock Composer Anu EndMap StartMap Type Media FileName music2 FileExtension .mp3 Drive c: FileSize 17536 FileDate 20090117:091804 FileNameAndPath c:\data\sounds\digital\music2.mp3 MimeType AUDIO/MPEG SongName music2.mp3 Artist Rafi Album Shaheed TrackNumber 2 Genre Classical Composer Dhawan EndMap StartMap Type Media FileName music3 FileExtension .mp3 Drive c: FileSize 434288 FileDate 20090117:090854 FileNameAndPath c:\data\others\music3.mp3 MimeType AUDIO/MPEG SongName music3.mp3 Artist Sonu Album Album1 TrackNumber 3 Genre Classical Composer Rahman EndMap ExpectedEnd
delete foobar
[Endtest]
*/

############################################ Music Ends #################################################
