mirror of
https://github.com/real-zony/ZonyLrcToolsX.git
synced 2025-09-05 21:16:52 +00:00
feat: Added KuWo(酷我) Music lyrics source (incomplete).
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Shouldly;
|
||||
using Xunit;
|
||||
using ZonyLrcTools.Common.Lyrics;
|
||||
|
||||
namespace ZonyLrcTools.Tests.Infrastructure.Lyrics
|
||||
{
|
||||
public class QQLyricsProviderTests : TestBase
|
||||
{
|
||||
private readonly ILyricsProvider _lyricsProvider;
|
||||
|
||||
public QQLyricsProviderTests()
|
||||
{
|
||||
_lyricsProvider = GetService<IEnumerable<ILyricsProvider>>()
|
||||
.FirstOrDefault(t => t.DownloaderName == InternalLyricsProviderNames.QQ);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task DownloadAsync_Test()
|
||||
{
|
||||
var lyric = await _lyricsProvider.DownloadAsync("东风破", "周杰伦");
|
||||
lyric.ShouldNotBeNull();
|
||||
lyric.IsPruneMusic.ShouldBe(false);
|
||||
}
|
||||
|
||||
// About the new feature mentioned in issue #87.
|
||||
// Github Issue: https://github.com/real-zony/ZonyLrcToolsX/issues/87
|
||||
[Fact]
|
||||
public async Task DownloadAsync_Issue85_Test()
|
||||
{
|
||||
var lyric = await _lyricsProvider.DownloadAsync("Looking at Me", "Sabrina Carpenter");
|
||||
|
||||
lyric.ShouldNotBeNull();
|
||||
lyric.IsPruneMusic.ShouldBeFalse();
|
||||
lyric.ToString().ShouldContain("你好像快要不能呼吸");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user