feat(runtime): VirtualTagActor skeleton (engine wiring tracked as F8)

This commit is contained in:
Joseph Doherty
2026-05-26 05:09:01 -04:00
parent 64c627f8d6
commit 39729bfe21
2 changed files with 63 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
using Akka.Actor;
using Shouldly;
using Xunit;
using ZB.MOM.WW.OtOpcUa.Runtime.Tests.Harness;
using ZB.MOM.WW.OtOpcUa.Runtime.VirtualTags;
namespace ZB.MOM.WW.OtOpcUa.Runtime.Tests.VirtualTags;
public sealed class VirtualTagActorTests : RuntimeActorTestBase
{
[Fact]
public void DependencyValueChanged_is_accepted_and_actor_stays_alive()
{
var actor = Sys.ActorOf(VirtualTagActor.Props("vt-1", "a + b"));
Watch(actor);
actor.Tell(new VirtualTagActor.DependencyValueChanged("tag-a", 10, DateTime.UtcNow));
actor.Tell(new VirtualTagActor.DependencyValueChanged("tag-b", 20, DateTime.UtcNow));
// No crash, no termination.
ExpectNoMsg(TimeSpan.FromMilliseconds(200));
}
}