mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-12-14 01:55:45 +00:00
39 lines
1 KiB
C#
39 lines
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);
|
|
}
|
|
}
|
|
|
|
[TestMethod]
|
|
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);
|
|
}
|
|
}
|
|
}
|