Package com.github.hakko.musiccabinet.ws.lastfm

Examples of com.github.hakko.musiccabinet.ws.lastfm.UserLovedTracksClient


    LastFmSettingsService lastFmSettingsService = mock(LastFmSettingsService.class);
    when(lastFmSettingsService.getLastFmUsers()).thenReturn(asList(user1, user2));
    when(lastFmSettingsService.isSyncStarredAndLovedTracks()).thenReturn(true);

    UserLovedTracksClient userLovedTracksClient = mock(UserLovedTracksClient.class);
    when(userLovedTracksClient.getUserLovedTracks(user1, (short) 0)).thenReturn(
        new WSResponse(new ResourceUtil(LOVED_TRACKS_FILE, UTF8).getContent()));
    when(userLovedTracksClient.getUserLovedTracks(user2, (short) 0)).thenReturn(
        new WSResponse(false, 403, "Forbidden"));

    UserLovedTracksService userLovedTracksService = new UserLovedTracksService();
    userLovedTracksService.setLastFmSettingsService(lastFmSettingsService);
    userLovedTracksService.setUserLovedTracksClient(userLovedTracksClient);
View Full Code Here

TOP

Related Classes of com.github.hakko.musiccabinet.ws.lastfm.UserLovedTracksClient

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.