mirror of
https://github.com/Sarsoo/IF.Lastfm.git
synced 2024-10-16 23:13:07 +01:00
Changed method name, added integration test
This commit is contained in:
parent
628adbe68d
commit
45563553ee
@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace IF.Lastfm.Core.Tests.Integration.Commands
|
||||
{
|
||||
public class UserGetWeeklyChartTests : CommandIntegrationTestsBase
|
||||
{
|
||||
[Test]
|
||||
public async Task GetChartList_Success()
|
||||
{
|
||||
var response = await Lastfm.User.GetWeeklyChartListAsync(INTEGRATION_TEST_USER);
|
||||
var chartlist = response.Content;
|
||||
|
||||
Assert.IsTrue(response.Success);
|
||||
Assert.IsNotEmpty(chartlist);
|
||||
Assert.That(chartlist.Last().ToDate, Is.EqualTo(DateTime.Now).Within(8).Days);
|
||||
}
|
||||
}
|
||||
}
|
@ -40,6 +40,6 @@ Task<PageResponse<LastShout>> GetShoutsAsync(string username,
|
||||
|
||||
Task<PageResponse<LastTrack>> GetLovedTracks(string username, int pagenumber, int count);
|
||||
|
||||
Task<PageResponse<LastWeeklyChartList>> GetWeeklyChartList(string username);
|
||||
Task<PageResponse<LastWeeklyChartList>> GetWeeklyChartListAsync(string username);
|
||||
}
|
||||
}
|
@ -132,7 +132,7 @@ public async Task<PageResponse<LastTrack>> GetLovedTracks(
|
||||
};
|
||||
return await command.ExecuteAsync();
|
||||
}
|
||||
public async Task<PageResponse<LastWeeklyChartList>> GetWeeklyChartList(string username)
|
||||
public async Task<PageResponse<LastWeeklyChartList>> GetWeeklyChartListAsync(string username)
|
||||
{
|
||||
var command = new GetWeeklyChartsCommand(auth: Auth, username: username)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user