mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 00:24:14 +01:00
reset GlobalFFOptions to null after testing
Former-commit-id: 8cacf074fd
This commit is contained in:
parent
c04546a156
commit
ce71aaab78
1 changed files with 8 additions and 2 deletions
|
@ -1,11 +1,19 @@
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
namespace FFMpegCore.Test
|
namespace FFMpegCore.Test
|
||||||
{
|
{
|
||||||
[TestClass]
|
[TestClass]
|
||||||
public class FFMpegArgumentProcessorTest
|
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
|
private static FFMpegArgumentProcessor CreateArgumentProcessor() => FFMpegArguments
|
||||||
.FromFileInput("")
|
.FromFileInput("")
|
||||||
|
@ -15,7 +23,6 @@ private static FFMpegArgumentProcessor CreateArgumentProcessor() => FFMpegArgume
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Processor_GlobalOptions_GetUsed()
|
public void Processor_GlobalOptions_GetUsed()
|
||||||
{
|
{
|
||||||
|
|
||||||
var globalWorkingDir = "Whatever";
|
var globalWorkingDir = "Whatever";
|
||||||
GlobalFFOptions.Configure(new FFOptions { WorkingDirectory = globalWorkingDir });
|
GlobalFFOptions.Configure(new FFOptions { WorkingDirectory = globalWorkingDir });
|
||||||
|
|
||||||
|
@ -27,7 +34,6 @@ public void Processor_GlobalOptions_GetUsed()
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Processor_SessionOptions_GetUsed()
|
public void Processor_SessionOptions_GetUsed()
|
||||||
{
|
{
|
||||||
|
|
||||||
var sessionWorkingDir = "./CurrentRunWorkingDir";
|
var sessionWorkingDir = "./CurrentRunWorkingDir";
|
||||||
|
|
||||||
var processor = CreateArgumentProcessor();
|
var processor = CreateArgumentProcessor();
|
||||||
|
|
Loading…
Reference in a new issue