public void Do_serialize_user_messages() { var message = new SomeUserMessage { A = "abc", B = 123, C = Guid.Empty }; TestActor.Tell(message); var result = ExpectMsg<SomeUserMessage>(); Assert.True(Sys.Settings.SerializeAllMessages); Assert.Equal(message, result); Assert.NotSame(message, result); }
public void DoesNotSerializesUserMessagesWhenSerializeAllMessagesIsOff() { var message = new SomeUserMessage { A = "abc", B = 123, C = Guid.Empty }; testActor.Tell(message); var result = queue.Take(); Assert.False(sys.Settings.SerializeAllMessages); Assert.Equal(message, result); Assert.Same(message, result); }
public void Do_serialize_user_messages() { var message = new SomeUserMessage { A = "abc", B = 123, C = Guid.Empty }; TestActor.Tell(message); var result = ExpectMsg <SomeUserMessage>(); Assert.True(Sys.Settings.SerializeAllMessages); Assert.Equal(message, result); Assert.NotSame(message, result); }
public void SerializesUserMessagesWhenSerializeAllMessagesIsOn() { var config = ConfigurationFactory.ParseString(@"akka.actor.serialize-messages = on"); var sys = ActorSystem.Create("test",config); testActor = sys.ActorOf(Props.Create(() => new TestActor(queue,messages))); var message = new SomeUserMessage { A = "abc", B = 123, C = Guid.Empty }; testActor.Tell(message); var result = queue.Take(); Assert.True(sys.Settings.SerializeAllMessages); Assert.Equal(message, result); Assert.NotSame(message, result); }
public void SerializesUserMessagesWhenSerializeAllMessagesIsOn() { var config = ConfigurationFactory.ParseString(@"akka.actor.serialize-messages = on"); var sys = ActorSystem.Create("test", config); testActor = sys.ActorOf(Props.Create(() => new TestActor(queue, messages))); var message = new SomeUserMessage { A = "abc", B = 123, C = Guid.Empty }; testActor.Tell(message); var result = queue.Take(); Assert.True(sys.Settings.SerializeAllMessages); Assert.Equal(message, result); Assert.NotSame(message, result); }