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>
This commit is contained in:
parent
5090aa7217
commit
5a45a7ac7f
19 changed files with 604 additions and 78 deletions
28
tests/AcDream.App.Tests/UI/ClientCommandControllerTests.cs
Normal file
28
tests/AcDream.App.Tests/UI/ClientCommandControllerTests.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
using AcDream.App.UI;
|
||||
using AcDream.UI.Abstractions;
|
||||
|
||||
namespace AcDream.App.Tests.UI;
|
||||
|
||||
public sealed class ClientCommandControllerTests
|
||||
{
|
||||
[Fact]
|
||||
public void LifestoneRecall_ExecutesSuppliedSessionActionOnce()
|
||||
{
|
||||
int recalls = 0;
|
||||
var controller = new ClientCommandController(() => recalls++);
|
||||
|
||||
controller.Execute(new ExecuteClientCommandCmd(
|
||||
ClientCommandId.LifestoneRecall, Arguments: string.Empty));
|
||||
|
||||
Assert.Equal(1, recalls);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void UnknownCommandId_FailsAtApplicationBoundary()
|
||||
{
|
||||
var controller = new ClientCommandController(() => { });
|
||||
var command = new ExecuteClientCommandCmd((ClientCommandId)999, string.Empty);
|
||||
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => controller.Execute(command));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue