acdream/tests/AcDream.App.Tests/Physics/RemoteTeleportHookTests.cs
Erik 1e98d81448 feat(vfx): port retail hidden and teleport presentation
Preserve canonical live-object ownership across Hidden transitions and remote teleport placement so effects, collision, streaming, and targeting remain synchronized.
2026-07-14 14:59:48 +02:00

38 lines
1.1 KiB
C#

using AcDream.App.Physics;
using AcDream.Core.Physics;
namespace AcDream.App.Tests.Physics;
public sealed class RemoteTeleportHookTests
{
[Fact]
public void Execute_UsesRetailOrderAndExactCancelContext()
{
var calls = new List<string>();
WeenieError cancelContext = WeenieError.None;
RemoteTeleportHook.Execute(new RemoteTeleportHookActions(
CancelMoveTo: error =>
{
cancelContext = error;
calls.Add("cancel");
},
UnStick: () => calls.Add("unstick"),
StopInterpolating: () => calls.Add("stop-interpolating"),
UnConstrain: () => calls.Add("unconstrain"),
NotifyTeleported: () => calls.Add("notify-teleported"),
ReportCollisionEnd: () => calls.Add("collision-end")));
Assert.Equal(0x3Cu, (uint)cancelContext);
Assert.Equal(
[
"cancel",
"unstick",
"stop-interpolating",
"unconstrain",
"notify-teleported",
"collision-end",
],
calls);
}
}