FFMpegCore/FFMpegCore.Test/DownloaderTests.cs

65 lines
1.6 KiB
C#

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))
{
var fileNames = FFMpegDownloader.AutoDownloadFFMpegSuite();
Assert.IsTrue(fileNames.Count == 3);
}
else
{
Assert.Inconclusive("This test is only for Windows");
}
}
[TestMethod]
public void GetLatestFFMpegTest()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
var fileNames = FFMpegDownloader.AutoDownloadFFMpeg();
Assert.IsTrue(fileNames.Count == 1);
}
else
{
Assert.Inconclusive("This test is only for Windows");
}
}
[TestMethod]
public void GetLatestFFProbeTest()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
var fileNames = FFMpegDownloader.AutoDownloadFFProbe();
Assert.IsTrue(fileNames.Count == 1);
}
else
{
Assert.Inconclusive("This test is only for Windows");
}
}
[TestMethod]
public void GetLatestFFPlayTest()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
var fileNames = FFMpegDownloader.AutoDownloadFFPlay();
Assert.IsTrue(fileNames.Count == 1);
}
else
{
Assert.Inconclusive("This test is only for Windows");
}
}
}