using System; using Spectre.Console.Cli; namespace Spectre.Console.Testing { public sealed class FakeCommandInterceptor : ICommandInterceptor { private readonly Action _action; public FakeCommandInterceptor(Action action) { _action = action ?? throw new ArgumentNullException(nameof(action)); } public void Intercept(CommandContext context, CommandSettings settings) { _action(context, settings); } } }