Akka.Interfaced.ProtobufSerializer.Tests.SerializeAkkaSurrogateTest.TestSurrogateForINotificationChannel C# (CSharp) Метод

TestSurrogateForINotificationChannel() приватный Метод

private TestSurrogateForINotificationChannel ( ) : void
Результат void
        public void TestSurrogateForINotificationChannel()
        {
            var system = ActorSystem.Create("Sys");
            var serializer = new ProtobufSerializer((ExtendedActorSystem)system);
            var actor = system.ActorOf<DummyActor>("TestActor");

            var obj = new ResponseMessage
            {
                ReturnPayload = new NotificationChannelReturnMessage { v = new AkkaReceiverNotificationChannel(actor) }
            };

            var bytes = serializer.ToBinary(obj);

            var obj2 = (ResponseMessage)serializer.FromBinary(bytes, null);
            Assert.Equal(obj.ReturnPayload.Value, obj2.ReturnPayload.Value);
        }
    }