mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-12-14 01:55:45 +00:00
Use subfolder in temp folder for testing download of binaries
This commit is contained in:
parent
2a25bff836
commit
54e28cea23
1 changed files with 12 additions and 4 deletions
|
|
@ -7,11 +7,20 @@ namespace FFMpegCore.Test;
|
|||
[TestClass]
|
||||
public class DownloaderTests
|
||||
{
|
||||
private FFOptions _ffOptions;
|
||||
|
||||
[TestInitialize]
|
||||
public void InitializeTestFolder()
|
||||
{
|
||||
var tempDownloadFolder = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
|
||||
Directory.CreateDirectory(tempDownloadFolder);
|
||||
_ffOptions = new FFOptions { BinaryFolder = Path.GetTempPath() };
|
||||
}
|
||||
|
||||
[OsSpecificTestMethod(OsPlatforms.Windows | OsPlatforms.Linux)]
|
||||
public async Task GetSpecificVersionTest()
|
||||
{
|
||||
var options = new FFOptions { BinaryFolder = Path.GetTempPath() };
|
||||
var binaries = await FFMpegDownloader.DownloadBinaries(FFMpegVersions.V6_1, options: options);
|
||||
var binaries = await FFMpegDownloader.DownloadBinaries(FFMpegVersions.V6_1, options: _ffOptions);
|
||||
try
|
||||
{
|
||||
Assert.HasCount(2, binaries);
|
||||
|
|
@ -25,8 +34,7 @@ public class DownloaderTests
|
|||
[OsSpecificTestMethod(OsPlatforms.Windows | OsPlatforms.Linux)]
|
||||
public async Task GetAllLatestSuiteTest()
|
||||
{
|
||||
var options = new FFOptions { BinaryFolder = Path.GetTempPath() };
|
||||
var binaries = await FFMpegDownloader.DownloadBinaries(options: options);
|
||||
var binaries = await FFMpegDownloader.DownloadBinaries(options: _ffOptions);
|
||||
try
|
||||
{
|
||||
Assert.HasCount(2, binaries);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue