GetPlaylist() 공개 메소드

public GetPlaylist ( int id ) : Playlist
id int
리턴 iTunesAgent.Services.Playlist
예제 #1
0
        public void GetPlaylist_ShouldReturNullWhenNoPlaylistWithTheGivenID()
        {
            ITunesServiceImpl service = GetServiceInstance();

            service.Initialize();

            MockLibrarySource librarySource = CreateAndSetUpLibrarySource();

            mockITunesApp.LibrarySource = librarySource;

            Playlist playlist = service.GetPlaylist(42);

            Assert.Null(playlist);
        }
예제 #2
0
        public void GetPlaylist_ShouldReturnPlaylistForTheGivenID()
        {
            ITunesServiceImpl service = GetServiceInstance();

            service.Initialize();

            MockLibrarySource librarySource = CreateAndSetUpLibrarySource();

            mockITunesApp.LibrarySource = librarySource;

            Playlist playlist = service.GetPlaylist(2);

            Assert.NotNull(playlist);
            Assert.AreEqual(2, playlist.ID);
        }