mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-03 04:41:36 -05:00
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>
16 lines
564 B
C#
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 })!;
|
|
}
|
|
}
|