Skip to content

Commit

Permalink
Test tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Noggog committed Nov 21, 2024
1 parent bcf1fc7 commit 61ad3cf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 23 deletions.
28 changes: 10 additions & 18 deletions Synthesis.Bethesda.CLI/RunPipeline/RunPipelineLogic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,19 @@ public RunPipelineLogic(

public static async Task<int> 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<IStartupTask[]>()
.ForEach(x => x.Start());
container
.Resolve<IStartupTask[]>()
.ForEach(x => x.Start());

await container
.Resolve<RunPipelineLogic>()
.RunInternal().ConfigureAwait(false);
}
catch (Exception ex)
{
System.Console.Error.WriteLine(ex);
return -1;
}
await container
.Resolve<RunPipelineLogic>()
.RunInternal().ConfigureAwait(false);
return 0;
}

Expand Down
10 changes: 5 additions & 5 deletions Synthesis.Bethesda.UnitTests/CLI/RunPipelineLogicTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down

0 comments on commit 61ad3cf

Please sign in to comment.