mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 00:24:14 +01:00
reset GlobalFFOptions to null after testing
This commit is contained in:
parent
47a6c23b2d
commit
8cacf074fd
1 changed files with 8 additions and 2 deletions
|
@ -1,11 +1,19 @@
|
|||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using FluentAssertions;
|
||||
using System.Reflection;
|
||||
|
||||
namespace FFMpegCore.Test
|
||||
{
|
||||
[TestClass]
|
||||
public class FFMpegArgumentProcessorTest
|
||||
{
|
||||
[TestCleanup]
|
||||
public void TestInitialize()
|
||||
|
||||
{
|
||||
// After testing reset global configuration to null, to be not wrong for other test relying on configuration
|
||||
typeof(GlobalFFOptions).GetField("_current", BindingFlags.NonPublic | BindingFlags.Static).SetValue(GlobalFFOptions.Current, null);
|
||||
}
|
||||
|
||||
private static FFMpegArgumentProcessor CreateArgumentProcessor() => FFMpegArguments
|
||||
.FromFileInput("")
|
||||
|
@ -15,7 +23,6 @@ private static FFMpegArgumentProcessor CreateArgumentProcessor() => FFMpegArgume
|
|||
[TestMethod]
|
||||
public void Processor_GlobalOptions_GetUsed()
|
||||
{
|
||||
|
||||
var globalWorkingDir = "Whatever";
|
||||
GlobalFFOptions.Configure(new FFOptions { WorkingDirectory = globalWorkingDir });
|
||||
|
||||
|
@ -27,7 +34,6 @@ public void Processor_GlobalOptions_GetUsed()
|
|||
[TestMethod]
|
||||
public void Processor_SessionOptions_GetUsed()
|
||||
{
|
||||
|
||||
var sessionWorkingDir = "./CurrentRunWorkingDir";
|
||||
|
||||
var processor = CreateArgumentProcessor();
|
||||
|
|
Loading…
Reference in a new issue