2023-09-06 14:07:08 -06:00
|
|
|
|
using FFMpegCore.Extensions.Downloader;
|
2025-01-27 22:22:47 -05:00
|
|
|
|
using FFMpegCore.Extensions.Downloader.Enums;
|
2023-04-11 22:42:51 -06:00
|
|
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
2023-04-11 21:55:30 -06:00
|
|
|
|
|
|
|
|
|
namespace FFMpegCore.Test;
|
|
|
|
|
|
2023-04-11 22:42:51 -06:00
|
|
|
|
[TestClass]
|
2023-04-11 21:55:30 -06:00
|
|
|
|
public class DownloaderTests
|
|
|
|
|
{
|
2023-04-11 22:42:51 -06:00
|
|
|
|
[TestMethod]
|
2023-09-06 01:25:51 -06:00
|
|
|
|
public void GetAllLatestSuiteTest()
|
2023-04-11 22:42:51 -06:00
|
|
|
|
{
|
2025-01-27 22:22:47 -05:00
|
|
|
|
var binaries = FFMpegDownloader.DownloadFFMpegSuite().Result;
|
|
|
|
|
Assert.IsTrue(binaries.Count == 2); // many platforms have only ffmpeg and ffprobe
|
2023-04-11 22:42:51 -06:00
|
|
|
|
}
|
2023-09-06 01:25:51 -06:00
|
|
|
|
|
2023-04-11 22:42:51 -06:00
|
|
|
|
[TestMethod]
|
2023-09-06 01:25:51 -06:00
|
|
|
|
public void GetSpecificVersionTest()
|
2023-04-11 22:42:51 -06:00
|
|
|
|
{
|
2025-01-27 22:22:47 -05:00
|
|
|
|
var binaries = FFMpegDownloader.DownloadFFMpegSuite(FFMpegVersions.V4_0, binaries: FFMpegBinaries.FFMpeg).Result;
|
2023-10-10 15:59:11 -06:00
|
|
|
|
Assert.IsTrue(binaries.Count == 1);
|
2023-04-11 21:55:30 -06:00
|
|
|
|
}
|
|
|
|
|
}
|