Make download tests run async

This commit is contained in:
Malte Rosenbjerg 2025-10-17 10:24:26 +02:00
parent bb90cb1ea1
commit f919a05d43

View file

@ -1,6 +1,5 @@
using FFMpegCore.Extensions.Downloader; using FFMpegCore.Extensions.Downloader;
using FFMpegCore.Extensions.Downloader.Enums; using FFMpegCore.Extensions.Downloader.Enums;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace FFMpegCore.Test; namespace FFMpegCore.Test;
@ -8,16 +7,16 @@ namespace FFMpegCore.Test;
public class DownloaderTests public class DownloaderTests
{ {
[TestMethod] [TestMethod]
public void GetSpecificVersionTest() public async Task GetSpecificVersionTest()
{ {
var binaries = FFMpegDownloader.DownloadFFMpegSuite(FFMpegVersions.V6_1).Result; var binaries = await FFMpegDownloader.DownloadFFMpegSuite(FFMpegVersions.V6_1);
Assert.IsTrue(binaries.Count == 2); Assert.HasCount(2, binaries);
} }
[TestMethod] [TestMethod]
public void GetAllLatestSuiteTest() public async Task GetAllLatestSuiteTest()
{ {
var binaries = FFMpegDownloader.DownloadFFMpegSuite().Result; var binaries = await FFMpegDownloader.DownloadFFMpegSuite();
Assert.IsTrue(binaries.Count == 2); // many platforms have only ffmpeg and ffprobe Assert.HasCount(2, binaries);
} }
} }