mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-23 22:56:25 +00:00
Fix GetRecommendationGenres, fixes #487
This commit is contained in:
parent
aed8548c5e
commit
d8e9386f62
26
SpotifyAPI.Web.Tests/Clients/BrowseClientTest.cs
Normal file
26
SpotifyAPI.Web.Tests/Clients/BrowseClientTest.cs
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Moq;
|
||||||
|
using NUnit.Framework;
|
||||||
|
using SpotifyAPI.Web.Http;
|
||||||
|
|
||||||
|
namespace SpotifyAPI.Web.Tests
|
||||||
|
{
|
||||||
|
[TestFixture]
|
||||||
|
public class BrowseClientTest
|
||||||
|
{
|
||||||
|
[Test]
|
||||||
|
public async Task GetRecommendationGenres_UsesCorrectURL()
|
||||||
|
{
|
||||||
|
var api = new Mock<IAPIConnector>();
|
||||||
|
var client = new BrowseClient(api.Object);
|
||||||
|
|
||||||
|
await client.GetRecommendationGenres();
|
||||||
|
|
||||||
|
api.Verify(a => a.Get<RecommendationGenresResponse>(
|
||||||
|
It.Is<Uri>((uri) => uri.ToString().Contains("recommendations/available-genre-seeds"))
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -60,7 +60,7 @@ namespace SpotifyAPI.Web
|
|||||||
|
|
||||||
public Task<RecommendationGenresResponse> GetRecommendationGenres()
|
public Task<RecommendationGenresResponse> GetRecommendationGenres()
|
||||||
{
|
{
|
||||||
return API.Get<RecommendationGenresResponse>(URLs.Recommendations());
|
return API.Get<RecommendationGenresResponse>(URLs.RecommendationGenres());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<NewReleasesResponse> GetNewReleases()
|
public Task<NewReleasesResponse> GetNewReleases()
|
||||||
|
Loading…
Reference in New Issue
Block a user