FFMpegCore/FFMpegCore.Test/DownloaderTests.cs
2025-10-17 15:08:35 +02:00

39 lines
1.1 KiB
C#

using FFMpegCore.Extensions.Downloader;
using FFMpegCore.Extensions.Downloader.Enums;
using FFMpegCore.Test.Utilities;
namespace FFMpegCore.Test;
[TestClass]
public class DownloaderTests
{
[OsSpecificTestMethod(OsPlatforms.Windows | OsPlatforms.Linux)]
public async Task GetSpecificVersionTest()
{
var options = new FFOptions { BinaryFolder = Path.GetTempPath() };
var binaries = await FFMpegDownloader.DownloadBinaries(FFMpegVersions.V6_1, options: options);
try
{
Assert.HasCount(2, binaries);
}
finally
{
binaries.ForEach(File.Delete);
}
}
[OsSpecificTestMethod(OsPlatforms.Windows | OsPlatforms.Linux)]
public async Task GetAllLatestSuiteTest()
{
var options = new FFOptions { BinaryFolder = Path.GetTempPath() };
var binaries = await FFMpegDownloader.DownloadBinaries(options: options);
try
{
Assert.HasCount(2, binaries);
}
finally
{
binaries.ForEach(File.Delete);
}
}
}