Akka.Interfaced.ProtobufSerializer.Tests.SerializeAkkaSurrogateTest.TestSurrogateForIActorRef C# (CSharp) Method

TestSurrogateForIActorRef() private method

private TestSurrogateForIActorRef ( ) : void
return void
        public void TestSurrogateForIActorRef()
        {
            var system = ActorSystem.Create("Sys");
            var serializer = new ProtobufSerializer((ExtendedActorSystem)system);
            var actor = system.ActorOf<DummyActor>("TestActor");

            var obj = new ResponseMessage
            {
                ReturnPayload = new ActorReturnMessage { v = actor }
            };

            var bytes = serializer.ToBinary(obj);

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