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-10-10 23:50:59 +02:00
|
|
|
|
[Ignore]
|
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-09-06 09:25:51 +02:00
|
|
|
|
var binaries = FFMpegDownloader.DownloadFFMpegSuite(binaries: FFMpegDownloader.FFMpegBinaries.FFProbe |
|
|
|
|
|
FFMpegDownloader.FFMpegBinaries.FFMpeg |
|
|
|
|
|
FFMpegDownloader.FFMpegBinaries.FFPlay).Result;
|
|
|
|
|
Assert.IsTrue(binaries.Count >= 2); // many platforms have only ffmpeg and ffprobe
|
2023-04-12 06:42:51 +02:00
|
|
|
|
}
|
2023-09-06 09:25:51 +02:00
|
|
|
|
|
2023-10-10 23:50:59 +02:00
|
|
|
|
[Ignore]
|
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-09-06 09:25:51 +02:00
|
|
|
|
var binaries = FFMpegDownloader.DownloadFFMpegSuite(FFMpegDownloader.FFMpegVersions.V4_0).Result;
|
|
|
|
|
Assert.IsTrue(binaries.Count == 2);
|
2023-04-12 05:55:30 +02:00
|
|
|
|
}
|
|
|
|
|
}
|