test: Add QQ Music Lyric Downloader UnitTest Method.

This commit is contained in:
real-zony
2021-05-08 18:30:53 +08:00
parent abdb1dea23
commit 8f70e434f0
11 changed files with 49 additions and 27 deletions

View File

@@ -20,11 +20,11 @@ namespace ZonyLrcTools.Tests.Infrastructure.Album
downloader.ShouldNotBeNull();
var albumBytes = await downloader.DownloadAsync("东方红", null);
albumBytes.Length.ShouldBeGreaterThan(0);
// 显示具体的图像。
var tempAlbumPath = Path.Combine(Directory.GetCurrentDirectory(), "tempAlbum.png");
File.Delete(tempAlbumPath);
await using var file = File.Create(tempAlbumPath);
await using var ws = new BinaryWriter(file);
ws.Write(albumBytes);