More cleanup

This commit is contained in:
Malte Rosenbjerg 2023-01-29 23:03:50 +01:00
parent 237fa3353f
commit 104caa609b
3 changed files with 3 additions and 10 deletions

View file

@ -242,7 +242,7 @@ public void Audio_Pan_ToMono()
Assert.IsTrue(success); Assert.IsTrue(success);
Assert.AreEqual(1, mediaAnalysis.AudioStreams.Count); Assert.AreEqual(1, mediaAnalysis.AudioStreams.Count);
Assert.AreEqual("mono", mediaAnalysis.PrimaryAudioStream.ChannelLayout); Assert.AreEqual("mono", mediaAnalysis.PrimaryAudioStream!.ChannelLayout);
} }
[TestMethod, Timeout(10000)] [TestMethod, Timeout(10000)]
@ -260,7 +260,7 @@ public void Audio_Pan_ToMonoNoDefinitions()
Assert.IsTrue(success); Assert.IsTrue(success);
Assert.AreEqual(1, mediaAnalysis.AudioStreams.Count); Assert.AreEqual(1, mediaAnalysis.AudioStreams.Count);
Assert.AreEqual("mono", mediaAnalysis.PrimaryAudioStream.ChannelLayout); Assert.AreEqual("mono", mediaAnalysis.PrimaryAudioStream!.ChannelLayout);
} }
[TestMethod, Timeout(10000)] [TestMethod, Timeout(10000)]

View file

@ -13,7 +13,7 @@ public void TestInitialize()
{ {
// After testing reset global configuration to null, to be not wrong for other test relying on configuration // 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); typeof(GlobalFFOptions).GetField("_current", BindingFlags.NonPublic | BindingFlags.Static)!.SetValue(GlobalFFOptions.Current, null);
} }
private static FFMpegArgumentProcessor CreateArgumentProcessor() => FFMpegArguments private static FFMpegArgumentProcessor CreateArgumentProcessor() => FFMpegArguments
@ -69,10 +69,6 @@ public void Processor_Options_CanBeOverridden_And_Configured()
[TestMethod] [TestMethod]
public void Options_Global_And_Session_Options_Can_Differ() public void Options_Global_And_Session_Options_Can_Differ()
{ {
FFMpegArgumentProcessor CreateArgumentProcessor() => FFMpegArguments
.FromFileInput("")
.OutputToFile("");
var globalWorkingDir = "Whatever"; var globalWorkingDir = "Whatever";
GlobalFFOptions.Configure(new FFOptions { WorkingDirectory = globalWorkingDir }); GlobalFFOptions.Configure(new FFOptions { WorkingDirectory = globalWorkingDir });

View file

@ -1,9 +1,6 @@
using FFMpegCore.Builders.MetaData; using FFMpegCore.Builders.MetaData;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using System; using System;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
namespace FFMpegCore.Test namespace FFMpegCore.Test