mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-16 00:42:51 +08:00
23 lines
620 B
C#
23 lines
620 B
C#
namespace Spectre.Console.Tests.Unit.Cli;
|
|
|
|
public sealed partial class CommandAppTests
|
|
{
|
|
[Fact]
|
|
[Expectation("Should_Expose_Raw_Arguments")]
|
|
public void Should_Return_Correct_Text_When_Command_Is_Unknown()
|
|
{
|
|
// Given
|
|
var app = new CommandAppTester();
|
|
app.Configure(config =>
|
|
{
|
|
config.AddCommand<EmptyCommand>("test");
|
|
});
|
|
|
|
// When
|
|
var result = app.Run("test", "--foo", "32", "--lol");
|
|
|
|
// Then
|
|
result.Context.ShouldNotBeNull();
|
|
result.Context.Arguments.ShouldBe(new[] { "test", "--foo", "32", "--lol" });
|
|
}
|
|
} |