
############################ Streaming URL ###########################################
/*
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 link 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\Others\link1.ram		StartMap Type Media FileName link1 FileExtension .ram Drive c: FileSize 13 FileDate 20070408:023233 FileNameAndPath c:\data\Others\link1.ram MimeType AUDIO/X-PN-REALAUDIO-PLUGIN LinkFirstURL rtsp:\/\/link1 EndMap
c:\data\Others\link2.ram		StartMap Type Media FileName link2 FileExtension .ram Drive c: FileSize 16 FileDate 20081019:033638 FileNameAndPath c:\data\Others\link2.ram MimeType AUDIO/X-PN-REALAUDIO-PLUGIN LinkFirstURL rtsp:\/\/nokia.com EndMap 
e:\data\Others\link3.ram		StartMap Type Media FileName link3 FileExtension .ram Drive e: FileSize 13 FileDate 20070408:023238 FileNameAndPath e:\data\Others\link3.ram MimeType AUDIO/X-PN-REALAUDIO-PLUGIN LinkFirstURL rtsp:\/\/link5 EndMap
c:\data\link4.ram						StartMap Type Media FileName link4 FileExtension .ram Drive c: FileSize 20 FileDate 20090024:085618 FileNameAndPath c:\data\link4.ram MimeType AUDIO/X-PN-REALAUDIO-PLUGIN LinkFirstURL rtsp:\/\/link4_url.mp3 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> Expected <Type> <FileName> <FileExtension> <Drive> <FileSize> <FileDate> <FileNameAndPath> <MimeType> <LinkFirstURL> Next/End
foobar GetFilesListL FileInfo StreamingUrl FileName link1 NULL NULL NULL 0 ExpectedStart StartMap Media link1 .ram c: 13 20070408:023233 c:\data\Others\link1.ram AUDIO/X-PN-REALAUDIO-PLUGIN rtsp:\/\/link1 EndMap ExpectedEnd 
delete foobar
[Endtest]
*/
############################################### Test cases starts ###############################################
/*
//GetList of StreamingUrl files by FileName, no startrange
//Input: FileName as Key and NULL as startrange
//Expected: errorcode 1003-MissingArgumentType
[Test]
title UrlNeg_FileNameKey_NoStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo StreamingUrl FileName NULL NULL NULL NULL 1003 
delete foobar
[Endtest]

//GetList of StreamingUrl files by MimeType, no startrange
//Input: MimeType as Key and NULL as startrange
//Expected: errorcode 1003-MissingArgumentType
[Test]
title UrlNeg_MimeTypeKey_NoStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo StreamingUrl MimeType NULL NULL NULL NULL 1003
delete foobar
[Endtest]


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

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

//GetList of StreamingUrl files by FileName
//Input: FileName as Key and link1 as startrange
//Expected: list of link files filtered based on FileName. Details of all files named link1 is returned
[Test]
title Url_FileNameKeyWithValidStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo StreamingUrl FileName link1 NULL NULL NULL 0 ExpectedStart StartMap FileName link1 EndMap ExpectedEnd // Org
delete foobar
[Endtest]

//GetList of StreamingUrl files by MimeType
//Input: MimeType as Key and AUDIO/X-PN-REALAUDIO-PLUGIN as startrange 
//Expected: list of link files with mimetype AUDIO/X-PN-REALAUDIO-PLUGIN are expected as o/p
[Test]
title Url_MimeTypeKeyWithValidStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo StreamingURL MimeType AUDIO/X-PN-REALAUDIO-PLUGIN NULL NULL NULL 0 ExpectedStart StartMap FileName link1 MimeType AUDIO/X-PN-REALAUDIO-PLUGIN EndMap StartMap FileName link2 MimeType AUDIO/X-PN-REALAUDIO-PLUGIN EndMap StartMap FileName link3 MimeType AUDIO/X-PN-REALAUDIO-PLUGIN EndMap FileName link4 MimeType AUDIO/X-PN-REALAUDIO-PLUGIN EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList of StreamingUrl files by LinkFirstURL as key
//Input: LinkFirstURL as Key and rtsp:\/\/nokia.com as startrange 
//Expected: list of link files having LinkFirstURL value rtsp:\/\/nokia.com is expected as o/p
[Test]
title Url_LinkFirstURLKeyWithValidStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo StreamingUrl LinkFirstURL rtsp:\/\/nokia.com NULL NULL NULL 0 ExpectedStart StartMap FileName link2 LinkFirstURL rtsp:\/\/nokia.com EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList with Null string as value for LinkFirstURL
//Input: LinkFirstURL as Key and a null string "NULL" startrange
//Expected: errorcode 1002-BadArgumentType
[Test]
title Url_LinFirstURLKey_NullStringStartRange
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo StreamingUrl LinkFirstURL "NULL" NULL NULL NULL 0
delete foobar
[Endtest]

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

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


//GetList with Ascending order for a given drive
//Input: FileSize as Key, 13 as startrange, Drive as SortKey and Ascending as SortOrder
//Expected: list of link files with filesize as 13, sorted in ascending order based on drive is expected
[Test]
title Url_SortAscendingOnDrive
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo StreamingUrl FileSize 13 NULL Drive Ascending 0 ExpectedStart StartMap FileName link1 Drive c: EndMap StartMap FileName link3 Drive e: EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Descending order for a given drive
//Input: FileSize as Key, 13 as startrange, Drive as SortKey and Descending as SortOrder
//Expected: list of link files with filesize as 13, sorted in descending order based on drive is expected
[Test]
title Url_SortDescendingOnDrive
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo StreamingUrl FileSize 13 NULL Drive Descending 0 ExpectedStart StartMap FileName link3 Drive e: EndMap StartMap FileName link1 Drive c: EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Ascending order for a given FileExtension
//Input: FileExtension as SortKey and Ascending as SortOrder
//Expected: list of all link files sorted in ascending order based on FileExtensions
[Test]
title Url_SortAscendingOnFileExtension
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo StreamingUrl NULL NULL NULL FileExtension Ascending 0 //ExpectedStart StartMap FileName link1 EndMap StartMap FileName link2 EndMap StartMap FileName link3 EndMap StartMap FileName link4 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Descending order for a given FileExtension
//Input: FileExtension as SortKey and Descending as SortOrder
//Expected: list of all link files sorted in descending order based on FileExtension
[Test]
title Url_SortDescendingOnFileExtension
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo StreamingUrl NULL NULL NULL FileExtension Descending 0 //ExpectedStart StartMap FileName link4 EndMap StartMap FileName link3 EndMap StartMap FileName link2 EndMap StartMap FileName link1 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Ascending order for a given MimeType
//Input: MimeType as SortKey and Ascending as SortOrder
//Expected: list of all link files sorted in ascending order based on MimeType
[Test]
title Url_SortAscendingOnMimeType
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo StreamingUrl NULL NULL NULL MimeType Ascending 0 //ExpectedStart StartMap FileName link1 EndMap StartMap FileName link2 EndMap StartMap FileName link3 EndMap StartMap FileName link4 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Descending order for a given MimeType
//Input: MimeType as SortKey and Descending as SortOrder
//Expected: list of all link files sorted in descending order based on MimeType
[Test]
title Url_SortDescendingOnMimeType
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo StreamingUrl NULL NULL NULL MimeType Descending 0 //ExpectedStart StartMap FileName link4 EndMap StartMap FileName link3 EndMap StartMap FileName link2 EndMap StartMap FileName link1 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Ascending order for a given FileSize
//Input: Drive as Key, c: as startrange, FileSize as SortKey and Ascending as SortOrder
//Expected: list of all link files in c: drive, sorted in ascending order based on their FileSize
[Test]
title Url_SortAscendingOnFileSize
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo StreamingUrl Drive c: NULL FileSize Ascending 0 ExpectedStart StartMap FileName link1 FileSize 13 EndMap StartMap FileName link2 FileSize 16 EndMap StartMap FileName link4 FileSize 20 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Descending order for a given FileSize
//Input: Drive as Key, c: as startrange, FileSize as SortKey and Descending as SortOrder
//Expected: list of all link files in c: drive, sorted in descending order based on the FileSize
[Test]
title Url_SortDescendingOnFileSize
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo StreamingUrl Drive c: NULL FileSize Descending 0 ExpectedStart StartMap FileName link4 FileSize 20 EndMap StartMap FileName link2 FileSize 16 EndMap StartMap FileName link1 FileSizze 13 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Ascending order for a given FileDate
//Input: Drive as Key, c: as startrange, FileDate as SortKey and Ascending as SortOrder
//Expected: list of link files in c: drive sorted in ascending order based on FileDate
[Test]
title Url_SortAscendingOnFileDate
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo StreamingUrl Drive c: NULL FileDate Ascending 0 ExpectedStart StartMap FileName link1 FileDate 20070408:023233 EndMap FileName link2 FileDate 20081019:033638 EndMap StartMap FileName link4 FileDate 20090024:085618 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList with Descending order for a given FileDate
//Input: Drive as Key, c: as startrange, FileDate as SortKey and Descending as SortOrder
//Expected: list of link files in c: drive sorted in dsscending order based on the FileDate
[Test]
title Url_SortDescendingOnFileDate
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo StreamingUrl Drive c: NULL FileDate Descending 0 ExpectedStart StartMap FileName link4 FileDate 20090024:085618 EndMap StartMap FileName link2 FileDate 20081019:033638 EndMap StartMap FileName link1 FileDate 20070408:023233 EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList with Ascending order for a given LinkFirstURL
//Input: LinkFirstURL as SortKey and Ascending as SortOrder
//Expected: list of all link files sorted in ascending order based on LinkFirstURL
[Test]
title Url_SortAscendingOnLinkFirstURL
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo StreamingUrl Drive c: NULL LinkFirstURL Ascending 0 ExpectedStart StartMap FileName link1 LinkFirstURL rtsp:\/\/link1 EndMap StartMap FileName link4 LinkFirstURL rtsp:\/\/link4_url.mp3 EndMap StartMap FileName link2 LinkFirstURL rtsp:\/\/nokia.com EndMap ExpectedEnd
delete foobar
[Endtest]

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


//GetList ascending(case sensitive) as sort order
//Input: FileDate as SortKey and Ascending as SortOrder
//Expected: list of link files sorted in ascending order based on the sort key filedate
[Test]
title Url_SortAscendingOnFileDate
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo StreamingUrl Drive c: NULL FileDate ascending 0 ExpectedStart StartMap FileName link1 FileDate 20070408:023233 EndMap FileName link2 FileDate 20081019:033638 EndMap StartMap FileName link4 FileDate 20090024:085618 EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList Ascending sort order for FileNameAndPath
//Input: FileNameAndPath as SortKey and Ascending as SortOrder
//Expected: list of link files sorted in ascending order based on FileNameAndPath
[Test]
title Url_SortAscendingOnFileNameAndPath
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo StreamingUrl Drive c: NULL FileNameAndPath Ascending 0 ExpectedStart StartMap FileNameAndPath c:\data\link4.ram EndMap StartMap FileNameAndPath c:\data\Others\link1.ram EndMap StartMap FileNameAndPath c:\data\Others\link2.ram EndMap ExpectedEnd
delete foobar
[Endtest]


//GetList Descending order for FileName
//Input: FileName as SortKey and Descending as SortOrder
//Expected: list of link files sorted in descending order based on FileName
[Test]
title Url_SortDescendingOnFileName
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo StreamingUrl Drive c: NULL FileName Descending 0 ExpectedStart StartMap FileName link4 EndMap StartMap FileName link2 EndMap StartMap FileName link1 EndMap ExpectedEnd
delete foobar
[Endtest]

//GetList case to check for all fields in the outputlist
//Input: Drive as Key,e: as startrange, no other values are passed
//Expected: all the link files in e: drive is expected in the output list
[Test]
title Url_DriveKey_e:StartRange_CheckForAllFields
create tmediaprovidertesting foobar
foobar GetFilesListL FileInfo StreamingUrl Drive e: NULL NULL NULL 0 ExpectedStart StartMap Type Media FileName link3 FileExtension .ram Drive e: FileSize 13 FileDate 20070408:023238 FileNameAndPath e:\data\Others\link3.ram MimeType AUDIO/X-PN-REALAUDIO-PLUGIN LinkFirstURL rtsp:\/\/link5 EndMap ExpectedEnd
delete foobar
[Endtest]
*/
############################################ StreamingURL Ends #################################################