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