public static void TestRestPing()
 {
     var expectedResponse = new SubsonicApi.RestData.SubsonicResponse {
         Status = "ok",
         Version = "1.1.1",
     };
     TestHelper.TestFileToRest("ping.xml", expectedResponse);
 }
 public static void TestRestSearchResult2()
 {
     var expectedResponse = new SubsonicApi.RestData.SubsonicResponse {
         Status = "ok",
         Version = "1.4.0",
         SearchResult2 = new SubsonicApi.RestData.SearchResult2 {
             Artists = new List<SubsonicApi.RestData.Artist> {
                 new SubsonicApi.RestData.Artist { Id = "1", Name = "ABBA" },
             },
             Albums = new List<SubsonicApi.RestData.Album> {
                 new SubsonicApi.RestData.Album {
                     Id = "11",
                     Parent = "1",
                     Title = "Arrival",
                     Artist = "ABBA",
                     IsDir = true,
                     CoverArt = "22",
                 },
                 new SubsonicApi.RestData.Album {
                     Id = "12",
                     Parent = "1",
                     Title = "Super Trouper",
                     Artist = "ABBA",
                     IsDir = true,
                     CoverArt = "23",
                 },
             },
             Songs = new List<SubsonicApi.RestData.Song> {
                 new SubsonicApi.RestData.Song {
                     Id = "112",
                     Parent = "11",
                     Title = "Money, Money, Money",
                     IsDir = false,
                     Album = "Arrival",
                     Artist = "ABBA",
                     Track = "7",
                     Year = 1978,
                     Genre = "Pop",
                     CoverArt = "25",
                     Size = 4910028,
                     ContentType = "audio/flac",
                     Suffix = "flac",
                     TranscodedContentType = "audio/mpeg",
                     TranscodedSuffix = "mp3",
                     Path = "ABBA/Arrival/Money, Money, Money.mp3",
                 },
             },
         },
     };
     TestHelper.TestFileToRest("searchResult2.xml", expectedResponse);
 }
 public static void TestRestUser()
 {
     var expectedResponse = new SubsonicApi.RestData.SubsonicResponse {
         Status = "ok",
         Version = "1.7.0",
         User = new SubsonicApi.RestData.User {
             UserName = "******",
             Email = "*****@*****.**",
             ScrobblingEnabled = true,
             AdminRole = false,
             SettingsRole = true,
             DownloadRole = true,
             UploadRole = false,
             PlaylistRole = true,
             CoverArtRole = true,
             CommentRole = true,
             PodcastRole = true,
             StreamRole = true,
             JukeboxRole = true,
             ShareRole = false,
         },
     };
     TestHelper.TestFileToRest("user.xml", expectedResponse);
 }
 public static void TestRestNowPlaying()
 {
     var expectedResponse = new SubsonicApi.RestData.SubsonicResponse {
         Status = "ok",
         Version = "1.4.0",
         NowPlaying = new List<SubsonicApi.RestData.NowPlaying> {
                 new SubsonicApi.RestData.NowPlaying {
                     UserName = "******",
                     MinutesAgo = 12,
                     PlayerId = "2",
                     Id = "111",
                     Parent = "11",
                     Title = "Dancing Queen",
                     IsDir = false,
                     Album = "Arrival",
                     Artist = "ABBA",
                     Track = "7",
                     Year = 1978,
                     Genre = "Pop",
                     CoverArt = "24",
                     Size = 8421341,
                     ContentType = "audio/mpeg",
                     Suffix = "mp3",
                     Path = "ABBA/Arrival/Dancing Queen.mp3",
                 },
                 new SubsonicApi.RestData.NowPlaying {
                     UserName = "******",
                     MinutesAgo = 1,
                     PlayerId = "4",
                     PlayerName = "Kitchen",
                     Id = "112",
                     Parent = "11",
                     Title = "Money, Money, Money",
                     IsDir = false,
                     Album = "Arrival",
                     Artist = "ABBA",
                     Track = "7",
                     Year = 1978,
                     Genre = "Pop",
                     CoverArt = "25",
                     Size = 4910028,
                     ContentType = "audio/flac",
                     Suffix = "flac",
                     TranscodedContentType = "audio/mpeg",
                     TranscodedSuffix = "mp3",
                     Path = "ABBA/Arrival/Money, Money, Money.mp3",
                 },
             },
     };
     TestHelper.TestFileToRest("nowPlaying.xml", expectedResponse);
 }