From 61ad3cf5f85824d08558c5425b55fa8d7350d68d Mon Sep 17 00:00:00 2001 From: Justin Swanson Date: Thu, 21 Nov 2024 16:27:33 -0600 Subject: [PATCH] Test tweaks --- .../RunPipeline/RunPipelineLogic.cs | 28 +++++++------------ .../CLI/RunPipelineLogicTests.cs | 10 +++---- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/Synthesis.Bethesda.CLI/RunPipeline/RunPipelineLogic.cs b/Synthesis.Bethesda.CLI/RunPipeline/RunPipelineLogic.cs index 3d29036e..097893ee 100644 --- a/Synthesis.Bethesda.CLI/RunPipeline/RunPipelineLogic.cs +++ b/Synthesis.Bethesda.CLI/RunPipeline/RunPipelineLogic.cs @@ -18,27 +18,19 @@ public RunPipelineLogic( public static async Task Run(RunPatcherPipelineCommand cmd, IFileSystem? fileSystem = null) { - try - { - var builder = new ContainerBuilder(); - builder.RegisterModule( - new RunPipelineModule(fileSystem.GetOrDefault(), cmd)); + var builder = new ContainerBuilder(); + builder.RegisterModule( + new RunPipelineModule(fileSystem.GetOrDefault(), cmd)); - var container = builder.Build(); + var container = builder.Build(); - container - .Resolve() - .ForEach(x => x.Start()); + container + .Resolve() + .ForEach(x => x.Start()); - await container - .Resolve() - .RunInternal().ConfigureAwait(false); - } - catch (Exception ex) - { - System.Console.Error.WriteLine(ex); - return -1; - } + await container + .Resolve() + .RunInternal().ConfigureAwait(false); return 0; } diff --git a/Synthesis.Bethesda.UnitTests/CLI/RunPipelineLogicTests.cs b/Synthesis.Bethesda.UnitTests/CLI/RunPipelineLogicTests.cs index bc2c6413..97dd153a 100644 --- a/Synthesis.Bethesda.UnitTests/CLI/RunPipelineLogicTests.cs +++ b/Synthesis.Bethesda.UnitTests/CLI/RunPipelineLogicTests.cs @@ -26,11 +26,11 @@ public async Task Typical( SkyrimMod someMod, Npc npc) { - using var dataFolder = TempFolder.Factory(); - using var patcherDir = TempFolder.Factory(); - using var outputDir = TempFolder.Factory(); - using var pluginList = new TempFile(); - using var pipelineSettingsFile = new TempFile(); + using var dataFolder = TempFolder.Factory(fileSystem: fileSystem); + using var patcherDir = TempFolder.Factory(fileSystem: fileSystem); + using var outputDir = TempFolder.Factory(fileSystem: fileSystem); + using var pluginList = new TempFile(fileSystem: fileSystem); + using var pipelineSettingsFile = new TempFile(fileSystem: fileSystem); var name = "TestName"; var result = await new CreateTemplatePatcherSolutionRunner(fileSystem).Run(new CreateTemplatePatcherCommand() {