public static void TestPing() { var expectedResponse = new SubsonicApi.Data.SubsonicResponse { Ok = true, Version = new SubsonicApi.Data.SubsonicVersion { Major = 1, Minor = 1, Patch = 1 }, }; TestHelper.TestFileToData("ping.xml", expectedResponse); }
public static void TestNowPlaying() { var expectedResponse = new SubsonicApi.Data.SubsonicResponse { Ok = true, Version = new SubsonicApi.Data.SubsonicVersion { Major = 1, Minor = 4, Patch = 0 }, _nowPlayingList = new List<SubsonicApi.Data.NowPlaying> { new SubsonicApi.Data.NowPlaying { UserName = "******", MinutesAgo = 12, PlayerId = new SubsonicApi.Data.SubsonicId("2"), Id = new SubsonicApi.Data.SubsonicId("111"), Parent = new SubsonicApi.Data.SubsonicId("11"), Title = "Dancing Queen", IsDirectory = false, Album = "Arrival", Artist = "ABBA", Track = "7", Year = 1978, Genre = "Pop", CoverArt = new SubsonicApi.Data.SubsonicId("24"), Size = 8421341, ContentType = "audio/mpeg", Suffix = "mp3", Path = "ABBA/Arrival/Dancing Queen.mp3", }, new SubsonicApi.Data.NowPlaying { UserName = "******", MinutesAgo = 1, PlayerId = new SubsonicApi.Data.SubsonicId("4"), PlayerName = "Kitchen", Id = new SubsonicApi.Data.SubsonicId("112"), Parent = new SubsonicApi.Data.SubsonicId("11"), Title = "Money, Money, Money", IsDirectory = false, Album = "Arrival", Artist = "ABBA", Track = "7", Year = 1978, Genre = "Pop", CoverArt = new SubsonicApi.Data.SubsonicId("25"), Size = 4910028, ContentType = "audio/flac", Suffix = "flac", TranscodedContentType = "audio/mpeg", TranscodedSuffix = "mp3", Path = "ABBA/Arrival/Money, Money, Money.mp3", }, }, }; TestHelper.TestFileToData("nowPlaying.xml", expectedResponse); }
public static void TestUser() { var expectedResponse = new SubsonicApi.Data.SubsonicResponse { Ok = true, Version = new SubsonicApi.Data.SubsonicVersion { Major = 1, Minor = 7, Patch = 0 }, User = new SubsonicApi.Data.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.TestFileToData("user.xml", expectedResponse); }
public static void TestSearchResult2() { var expectedResponse = new SubsonicApi.Data.SubsonicResponse { Ok = true, Version = new SubsonicApi.Data.SubsonicVersion { Major = 1, Minor = 4, Patch = 0 }, SearchResult2 = new SubsonicApi.Data.SearchResult2 { _artists = new List<SubsonicApi.Data.Artist> { new SubsonicApi.Data.Artist { Id = new SubsonicApi.Data.SubsonicId("1"), Name = "ABBA" }, }, _albums = new List<SubsonicApi.Data.Album> { new SubsonicApi.Data.Album { Id = new SubsonicApi.Data.SubsonicId("11"), Parent = new SubsonicApi.Data.SubsonicId("1"), Title = "Arrival", Artist = "ABBA", IsDirectory = true, CoverArt = new SubsonicApi.Data.SubsonicId("22"), }, new SubsonicApi.Data.Album { Id = new SubsonicApi.Data.SubsonicId("12"), Parent = new SubsonicApi.Data.SubsonicId("1"), Title = "Super Trouper", Artist = "ABBA", IsDirectory = true, CoverArt = new SubsonicApi.Data.SubsonicId("23"), }, }, _songs = new List<SubsonicApi.Data.Song> { new SubsonicApi.Data.Song { Id = new SubsonicApi.Data.SubsonicId("112"), Parent = new SubsonicApi.Data.SubsonicId("11"), Title = "Money, Money, Money", IsDirectory = false, Album = "Arrival", Artist = "ABBA", Track = "7", Year = 1978, Genre = "Pop", CoverArt = new SubsonicApi.Data.SubsonicId("25"), Size = 4910028, ContentType = "audio/flac", Suffix = "flac", TranscodedContentType = "audio/mpeg", TranscodedSuffix = "mp3", Path = "ABBA/Arrival/Money, Money, Money.mp3", }, }, }, }; TestHelper.TestFileToData("searchResult2.xml", expectedResponse); }