diff --git a/src/contrib/serializers/Akka.Serialization.TestKit/AkkaSerializationSpec.cs b/src/contrib/serializers/Akka.Serialization.TestKit/AkkaSerializationSpec.cs index 0e896fc7007..3ea48e0a560 100644 --- a/src/contrib/serializers/Akka.Serialization.TestKit/AkkaSerializationSpec.cs +++ b/src/contrib/serializers/Akka.Serialization.TestKit/AkkaSerializationSpec.cs @@ -383,6 +383,25 @@ public void CanSerializeActorPathContainer() Assert.Equal(actorPath, deserialized.Contents); } + [Fact] + public void CanSerializeActorPathCollection() + { + var collection = new [] + { + ActorPath.Parse("akka.tcp://sys@localhost:9100/user1/actor"), + ActorPath.Parse("akka.tcp://sys@localhost:9100/user2/actor"), + ActorPath.Parse("akka.tcp://sys@localhost:9100/user1/actor") + }; + var serializer = Sys.Serialization.FindSerializerFor(collection); + var serialized = serializer.ToBinary(collection); + var deserialized = (ActorPath[])serializer.FromBinary(serialized, typeof(ActorPath[])); + + Assert.Equal(collection.Length, deserialized.Length); + Assert.Equal(collection[0], deserialized[0]); + Assert.Equal(collection[1], deserialized[1]); + Assert.Equal(collection[2], deserialized[2]); + } + [Fact] public void CanSerializeSingletonMessages() {