File tree Expand file tree Collapse file tree
SpotifyAPI.Web.Tests/Clients Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . Collections . Generic ;
3+ using System . Threading . Tasks ;
4+ using Moq ;
5+ using NUnit . Framework ;
6+ using SpotifyAPI . Web . Http ;
7+
8+ namespace SpotifyAPI . Web . Tests
9+ {
10+ [ TestFixture ]
11+ public class BrowseClientTest
12+ {
13+ [ Test ]
14+ public async Task GetRecommendationGenres_UsesCorrectURL ( )
15+ {
16+ var api = new Mock < IAPIConnector > ( ) ;
17+ var client = new BrowseClient ( api . Object ) ;
18+
19+ await client . GetRecommendationGenres ( ) ;
20+
21+ api . Verify ( a => a . Get < RecommendationGenresResponse > (
22+ It . Is < Uri > ( ( uri ) => uri . ToString ( ) . Contains ( "recommendations/available-genre-seeds" ) )
23+ ) ) ;
24+ }
25+ }
26+ }
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ public Task<RecommendationsResponse> GetRecommendations(RecommendationsRequest r
6060
6161 public Task < RecommendationGenresResponse > GetRecommendationGenres ( )
6262 {
63- return API . Get < RecommendationGenresResponse > ( URLs . Recommendations ( ) ) ;
63+ return API . Get < RecommendationGenresResponse > ( URLs . RecommendationGenres ( ) ) ;
6464 }
6565
6666 public Task < NewReleasesResponse > GetNewReleases ( )
You can’t perform that action at this time.
0 commit comments