Ejemplo n.º 1
0
        public void Device_actor_must_ignore_wrong_registration_requests()
        {
            var sys         = ActorSystem.Create("mysys");
            var probe       = new TestKit().CreateTestProbe();
            var deviceActor = sys.ActorOf(Device.Props("group", "device"));

            deviceActor.Tell(new RequestTrackDevice("wrongGroup", "device"), probe.Ref);
            probe.ExpectNoMsg(TimeSpan.FromMilliseconds(500));

            deviceActor.Tell(new RequestTrackDevice("group", "Wrongdevice"), probe.Ref);
            probe.ExpectNoMsg(TimeSpan.FromMilliseconds(500));
        }
Ejemplo n.º 2
0
        public void DeviceGroup_actor_must_ignore_requests_for_wrong_groupId()
        {
            var sys        = ActorSystem.Create("mysys");
            var probe      = new TestKit().CreateTestProbe();
            var groupActor = sys.ActorOf(DeviceGroup.Props("group"));

            groupActor.Tell(new RequestTrackDevice("wrongGroup", "device1"), probe.Ref);
            probe.ExpectNoMsg(TimeSpan.FromMilliseconds(500));
        }