public Property HeliosTransport_should_map_valid_IPEndpoints_to_Address(IPEndPoint endpoint)
        {
            var addr     = HeliosTransport.MapSocketToAddress(endpoint, "akka.tcp", "foo");
            var parsedEp = (IPEndPoint)HeliosTransport.AddressToSocketAddress(addr);

            return(endpoint.Equals(parsedEp).Label("Should be able to parse endpoint to address and back"));
        }
        public Property HeliosTransport_should_map_valid_IPEndpoints_to_ActorPath(IPEndPoint endpoint)
        {
            var addr                = HeliosTransport.MapSocketToAddress(endpoint, "akka.tcp", "foo");
            var actorPath           = new RootActorPath(addr) / "user" / "foo";
            var serializationFormat = actorPath.ToSerializationFormat();
            var reparsedActorPath   = ActorPath.Parse(serializationFormat);

            return(actorPath.Equals(reparsedActorPath).Label($"Should be able to parse endpoint to ActorPath and back; expected {actorPath.ToSerializationFormat()} but was {reparsedActorPath.ToSerializationFormat()}"));
        }
示例#3
0
        public Property HeliosTransport_should_map_valid_IPEndpoints_to_ActorPath(IPEndPoint endpoint)
        {
            // TODO: remove this once Mono Uris support IPV6 https://bugzilla.xamarin.com/show_bug.cgi?id=43649 (8/22/2016 Aaronontheweb)
            if (IsMono && endpoint.AddressFamily == AddressFamily.InterNetworkV6)
            {
                return(true.Label("Mono does not currently support Uri.TryParse for IPV6"));
            }
            var addr                = HeliosTransport.MapSocketToAddress(endpoint, "akka.tcp", "foo");
            var actorPath           = new RootActorPath(addr) / "user" / "foo";
            var serializationFormat = actorPath.ToSerializationFormat();
            var reparsedActorPath   = ActorPath.Parse(serializationFormat);

            return(actorPath.Equals(reparsedActorPath).Label($"Should be able to parse endpoint to ActorPath and back; expected {actorPath.ToSerializationFormat()} but was {reparsedActorPath.ToSerializationFormat()}"));
        }