mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-25 23:46:27 +00:00
28 lines
706 B
C#
28 lines
706 B
C#
|
using System.Collections.Generic;
|
||
|
using System.Threading.Tasks;
|
||
|
using Moq;
|
||
|
using NUnit.Framework;
|
||
|
using SpotifyAPI.Web.Http;
|
||
|
|
||
|
namespace SpotifyAPI.Web.Tests
|
||
|
{
|
||
|
[TestFixture]
|
||
|
public class FollowClientTest
|
||
|
{
|
||
|
[Test]
|
||
|
public async Task OfCurrentUser_PassesQueryParams()
|
||
|
{
|
||
|
var api = new Mock<IAPIConnector>();
|
||
|
var client = new FollowClient(api.Object);
|
||
|
|
||
|
var request = new FollowOfCurrentUserRequest(FollowOfCurrentUserRequest.Type.Artist);
|
||
|
await client.OfCurrentUser(request);
|
||
|
|
||
|
api.Verify(a => a.Get<FollowedArtistsResponse>(
|
||
|
SpotifyUrls.CurrentUserFollower(),
|
||
|
It.Is<Dictionary<string, string>>(val => val.ContainsKey("type"))
|
||
|
));
|
||
|
}
|
||
|
}
|
||
|
}
|