refactor: Refactor the code of the Download command.

This commit is contained in:
real-zony
2022-10-23 22:48:06 +08:00
parent 64d26cbc4c
commit 6b72f919b8
12 changed files with 151 additions and 127 deletions

View File

@@ -14,8 +14,8 @@ namespace ZonyLrcTools.Tests.Infrastructure.Album
[Fact]
public async Task DownloadDataAsync_Test()
{
var downloader = ServiceProvider.GetRequiredService<IEnumerable<IAlbumDownloader>>()
.FirstOrDefault(x => x.DownloaderName == InternalAlbumDownloaderNames.NetEase);
var downloader = ServiceProvider.GetRequiredService<IEnumerable<IAlbumProvider>>()
.FirstOrDefault(x => x.DownloaderName == InternalAlbumProviderNames.NetEase);
downloader.ShouldNotBeNull();
var albumBytes = await downloader.DownloadAsync("东方红", null);

View File

@@ -12,8 +12,8 @@ namespace ZonyLrcTools.Tests.Infrastructure.Album
{
public async Task DownloadDataAsync_Test()
{
var downloader = ServiceProvider.GetRequiredService<IEnumerable<IAlbumDownloader>>()
.FirstOrDefault(x => x.DownloaderName == InternalAlbumDownloaderNames.QQ);
var downloader = ServiceProvider.GetRequiredService<IEnumerable<IAlbumProvider>>()
.FirstOrDefault(x => x.DownloaderName == InternalAlbumProviderNames.QQ);
downloader.ShouldNotBeNull();
var albumBytes = await downloader.DownloadAsync("东方红", null);