FFMpegCore/FFMpegCore.Test/DownloaderTests.cs

66 lines
1.6 KiB
C#
Raw Normal View History

using System.Runtime.InteropServices;
using FFMpegCore.Helpers;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace FFMpegCore.Test;
[TestClass]
public class DownloaderTests
{
[TestMethod]
public void GetLatestSuiteTest()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
2023-05-05 09:30:52 +02:00
var fileNames = FFMpegDownloader.DownloadFFMpegSuite();
Assert.IsTrue(fileNames.Count == 3);
}
else
{
Assert.Inconclusive("This test is only for Windows");
}
}
2023-05-05 09:54:50 +02:00
[TestMethod]
public void GetLatestFFMpegTest()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
2023-05-05 09:30:52 +02:00
var fileNames = FFMpegDownloader.DownloadFFMpeg();
Assert.IsTrue(fileNames.Count == 1);
}
else
{
Assert.Inconclusive("This test is only for Windows");
}
}
2023-05-05 09:54:50 +02:00
[TestMethod]
public void GetLatestFFProbeTest()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
2023-05-05 09:30:52 +02:00
var fileNames = FFMpegDownloader.DownloadFFProbe();
Assert.IsTrue(fileNames.Count == 1);
}
else
{
Assert.Inconclusive("This test is only for Windows");
}
}
2023-05-05 09:54:50 +02:00
[TestMethod]
public void GetLatestFFPlayTest()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
2023-05-05 09:30:52 +02:00
var fileNames = FFMpegDownloader.DownloadFFPlay();
Assert.IsTrue(fileNames.Count == 1);
}
else
{
Assert.Inconclusive("This test is only for Windows");
}
}
}