FF-1173 - updated for new file service

This commit is contained in:
John Andrews
2024-01-11 15:00:16 +13:00
parent eb9d94fdfc
commit 04017d1d6a
19 changed files with 580 additions and 39 deletions
+2 -5
View File
@@ -4,11 +4,7 @@ namespace VideoNodes.Tests;
using FileFlows.VideoNodes;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
[TestClass]
public class AudioExtractorTests : TestBase
@@ -39,6 +35,7 @@ public class AudioExtractorTests : TestBase
var log = logger.ToString();
Assert.AreEqual(1, output);
}
[TestMethod]
public void AudioExtractor_Mp3_English()
{
@@ -4,6 +4,7 @@ using FileFlows.VideoNodes.FfmpegBuilderNodes;
using FileFlows.VideoNodes.FfmpegBuilderNodes.Models;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using VideoNodes.Tests;
using System.IO;
namespace FileFlows.VideoNodes.Tests.FfmpegBuilderTests;
@@ -3,6 +3,7 @@
using FileFlows.VideoNodes.FfmpegBuilderNodes;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using VideoNodes.Tests;
using System.IO;
namespace FileFlows.VideoNodes.Tests.FfmpegBuilderTests;
@@ -40,7 +41,7 @@ public class FfmpegBuilder_VideoEncode_VideoEncodeTests: TestBase
int result = ffExecutor.Execute(args);
string log = logger.ToString();
if(args.WorkingFile.StartsWith(args.TempPath))
File.Move(args.WorkingFile, Path.Combine(args.TempPath, outfile), true);
File.Move(args.WorkingFile, FileHelper.Combine(args.TempPath, outfile), true);
Assert.AreEqual(1, result);
return (result, log);
}
+1 -4
View File
@@ -5,10 +5,7 @@ namespace VideoNodes.Tests
using FileFlows.VideoNodes;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
[TestClass]
public class SubtitleExtractorTests: TestBase
+3 -2
View File
@@ -4,6 +4,7 @@ using System.Runtime.InteropServices;
using FileFlows.VideoNodes;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Text.Json;
using System.IO;
namespace VideoNodes.Tests;
@@ -20,11 +21,11 @@ public abstract class TestBase
[TestInitialize]
public void TestInitialize()
{
if (File.Exists("../../../test.settings.dev.json"))
if (System.IO.File.Exists("../../../test.settings.dev.json"))
{
LoadSettings("../../../test.settings.dev.json");
}
else if (File.Exists("../../../test.settings.json"))
else if (System.IO.File.Exists("../../../test.settings.json"))
{
LoadSettings("../../../test.settings.json");
}