/// <inheritdoc/> public void GetLastFMRecentlyPlayedMusic() { var searchResult = externalAPIGateway.GetLastFMRecentlyPlayed(userName); var playHistoryContainer = (PageResponse <LastTrack>)searchResult.Value; foreach (var song in playHistoryContainer.Content) { searchResults.Add(song); } }
public void GetLastFMRecentlyPlayedWithoutAfterParam_CorrectResponseReturned() { sut = MakeSut(); var listeningHistory = sut.GetLastFMRecentlyPlayed("SomeUser"); IF.Lastfm.Core.Api.Helpers.PageResponse <IF.Lastfm.Core.Objects.LastTrack> actualHistory = (IF.Lastfm.Core.Api.Helpers.PageResponse <IF.Lastfm.Core.Objects.LastTrack>)listeningHistory.Value; actualHistory.Should().NotBeNull(); actualHistory.Should().BeOfType <IF.Lastfm.Core.Api.Helpers.PageResponse <IF.Lastfm.Core.Objects.LastTrack> >(); actualHistory.Content.Should().HaveCount(2); }