acdream/tests/AcDream.UI.Abstractions.Tests/Panels/Chat/RetailClientCommandCatalogTests.cs
Erik 5a45a7ac7f feat(chat): route retail lifestone commands
Separate retail client actions, ACE server commands, and ordinary chat at the shared router. Port lifestone/lif/ls from the named retail registry through a typed App controller to game action 0x0063, keep unknown verbs on ACE Talk, and cover both UI backends plus exact outbound bytes.

Co-Authored-By: Codex <codex@openai.com>
2026-07-13 11:43:19 +02:00

38 lines
1.2 KiB
C#

using AcDream.UI.Abstractions;
using AcDream.UI.Abstractions.Panels.Chat;
namespace AcDream.UI.Abstractions.Tests.Panels.Chat;
public sealed class RetailClientCommandCatalogTests
{
[Theory]
[InlineData("/lifestone")]
[InlineData("@lifestone")]
[InlineData("/lif")]
[InlineData("@LIF")]
[InlineData("/ls")]
[InlineData("@LS")]
public void RetailAliases_ResolveCaseInsensitively(string input)
{
Assert.True(RetailClientCommandCatalog.TryMatch(input, out var match));
Assert.Equal(ClientCommandId.LifestoneRecall, match.Command);
Assert.True(match.HasValidArguments);
Assert.Empty(match.Arguments);
}
[Fact]
public void LifestoneArgument_IsRecognizedButInvalid()
{
Assert.True(RetailClientCommandCatalog.TryMatch("/ls now", out var match));
Assert.Equal("now", match.Arguments);
Assert.False(match.HasValidArguments);
Assert.Equal("/lifestone", match.Usage);
}
[Theory]
[InlineData("/ci 629")]
[InlineData("@acehelp")]
[InlineData("ordinary speech")]
public void NonClientCommands_DoNotMatch(string input)
=> Assert.False(RetailClientCommandCatalog.TryMatch(input, out _));
}