mirror of
https://github.com/real-zony/ZonyLrcToolsX.git
synced 2025-08-31 17:56:53 +00:00
refactor: Refactor the code of the Download command.
This commit is contained in:
@@ -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);
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user