mirror of
https://github.com/real-zony/ZonyLrcToolsX.git
synced 2025-08-31 17:56:53 +00:00
fix: Fixed the index exception that may be caused by the KuGou music provider.
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Shouldly;
|
||||
using Xunit;
|
||||
using ZonyLrcTools.Common.Infrastructure.Exceptions;
|
||||
using ZonyLrcTools.Common.Lyrics;
|
||||
|
||||
namespace ZonyLrcTools.Tests.Infrastructure.Lyrics
|
||||
@@ -25,5 +26,18 @@ namespace ZonyLrcTools.Tests.Infrastructure.Lyrics
|
||||
lyric.ShouldNotBeNull();
|
||||
lyric.IsPruneMusic.ShouldBe(false);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task DownloadAsync_Issue133_Test()
|
||||
{
|
||||
await Should.ThrowAsync<ErrorCodeException>(_lyricsProvider.DownloadAsync("天ノ弱", "漆柚").AsTask);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task DownloadAsync_Index_Exception_Test()
|
||||
{
|
||||
var lyric = await _lyricsProvider.DownloadAsync("40'z", "ZOOLY");
|
||||
lyric.ToString().ShouldNotBeNullOrEmpty();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user