2020-07-22 20:51:19 +01:00
|
|
|
using System;
|
2022-11-18 11:30:09 +00:00
|
|
|
using System.Threading;
|
2020-07-22 20:51:19 +01:00
|
|
|
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>(
|
2022-11-18 11:30:09 +00:00
|
|
|
It.Is<Uri>((uri) => uri.ToString().Contains("recommendations/available-genre-seeds")),
|
|
|
|
It.IsAny<CancellationToken>()
|
2020-07-22 20:51:19 +01:00
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|