Files
OpenNest/OpenNest.FrontEnd.Tests/ConsoleHost.cs
T
ajandClaude Opus 5.5 658b3552c1 test(frontend): share the in-process console runner
Three front-end test classes ran NestConsole.Run through their own
reflection helper. They now import ConsoleHost.RunConsole.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 11:23:01 -05:00

16 lines
564 B
C#

using System.Reflection;
namespace OpenNest.FrontEnd.Tests;
/// <summary>Runs the console front end in-process. Import with <c>using static</c>.</summary>
internal static class ConsoleHost
{
/// <summary>Calls <c>NestConsole.Run</c> and returns its exit code.</summary>
public static int RunConsole(params string[] args)
{
var method = Assembly.Load("OpenNest.Console").GetType("NestConsole")!
.GetMethod("Run", BindingFlags.Static | BindingFlags.Public)!;
return (int)method.Invoke(null, new object[] { args })!;
}
}