public void CanSerializeActorRef() { var message = new SomeMessage { ActorRef = TestActor, }; var serializer = Sys.Serialization.FindSerializerFor(message); var serialized = serializer.ToBinary(message); var deserialized = (SomeMessage)serializer.FromBinary(serialized, typeof(SomeMessage)); Assert.Same(TestActor, deserialized.ActorRef); }
public void CanSerializeActorRef() { var message = new SomeMessage { ActorRef = testActor, }; var serializer = sys.Serialization.FindSerializerFor(message); var serialized = serializer.ToBinary(message); var deserialized = (SomeMessage)serializer.FromBinary(serialized, typeof(SomeMessage)); Assert.Same(testActor, deserialized.ActorRef); }
public void CanSerializeFutureActorRef() { sys.EventStream.Subscribe(testActor, typeof(object)); var empty = sys.ActorOf<EmptyActor>(); empty.Ask("hello"); var f = (FutureActorRef)queue.Take(); var message = new SomeMessage { ActorRef = f, }; var serializer = sys.Serialization.FindSerializerFor(message); var serialized = serializer.ToBinary(message); var deserialized = (SomeMessage)serializer.FromBinary(serialized, typeof(SomeMessage)); Assert.Same(f, deserialized.ActorRef); }
public void CanSerializeFutureActorRef() { Sys.EventStream.Subscribe(TestActor, typeof(object)); var empty = Sys.ActorOf<EmptyActor>(); empty.Ask("hello"); var f = ExpectMsg<FutureActorRef>(); var message = new SomeMessage { ActorRef = f, }; var serializer = Sys.Serialization.FindSerializerFor(message); var serialized = serializer.ToBinary(message); var deserialized = (SomeMessage)serializer.FromBinary(serialized, typeof(SomeMessage)); Assert.Same(f, deserialized.ActorRef); }