refactor: Use Object to replace byte arrays when generating lyrics.

This commit is contained in:
real-zony
2022-10-28 10:13:14 +08:00
parent b7b1f36bf5
commit 5d1e90f638
14 changed files with 37 additions and 42 deletions

View File

@@ -18,6 +18,7 @@ namespace ZonyLrcTools.Tests.Infrastructure.Lyrics
}
[Fact]
[Trait("LyricsProvider", "KuGou")]
public async Task DownloadAsync_Test()
{
var lyric = await _lyricsProvider.DownloadAsync("东方红", null);

View File

@@ -18,6 +18,7 @@ public class KuWoLyricsProviderTests : TestBase
}
[Fact]
[Trait("LyricsProvider ", "KuGou")]
public async Task DownloadAsync_Test()
{
var lyric = await _kuwoLyricsProvider.DownloadAsync("告白气球", "周杰伦");

View File

@@ -21,6 +21,7 @@ namespace ZonyLrcTools.Tests.Infrastructure.Lyrics
}
[Fact]
[Trait("LyricsProvider ", "NetEase")]
public async Task DownloadAsync_Test()
{
var lyric = await _lyricsProvider.DownloadAsync("Hollow", "Janet Leon");
@@ -93,7 +94,7 @@ namespace ZonyLrcTools.Tests.Infrastructure.Lyrics
{
var options = ServiceProvider.GetRequiredService<IOptions<GlobalOptions>>();
options.Value.Provider.Lyric.Config.IsOnlyOutputTranslation = true;
var lyric = await _lyricsProvider.DownloadAsync("Bones", "Image Dragons");
lyric.ToString().ShouldNotContain("Gimme, gimme, gimme some time to think");
}

View File

@@ -18,13 +18,14 @@ namespace ZonyLrcTools.Tests.Infrastructure.Lyrics
}
[Fact]
[Trait("LyricsProvider", "QQ")]
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]