fix: 修复当翻译歌词没有的时候,导致 NULL 引用异常。

Closes https://github.com/real-zony/ZonyLrcToolsX/issues/82
Closes https://github.com/real-zony/ZonyLrcToolsX/issues/83
This commit is contained in:
real-zony
2022-01-06 15:27:57 +08:00
parent c6a275ce07
commit 9ef700df46
2 changed files with 14 additions and 1 deletions

View File

@@ -34,5 +34,13 @@ namespace ZonyLrcTools.Tests.Infrastructure.Lyric
lyric.IsPruneMusic.ShouldBe(false);
lyric.ToString().Contains("惑う心繋ぎ止める").ShouldBeTrue();
}
[Fact]
public async Task DownloadAsync_Issue_82_Test()
{
var lyric = await _lyricDownloader.DownloadAsync("シンデレラ (Giga First Night Remix)", "DECO 27 ギガP");
lyric.ShouldNotBeNull();
lyric.IsPruneMusic.ShouldBe(true);
}
}
}