acdream/tests/AcDream.App.Tests/UI/ClientCommandControllerTests.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

28 lines
817 B
C#

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));
}
}