public Property HeliosTransport_should_map_valid_IPEndpoints_to_Address(IPEndPoint endpoint) { var addr = DotNettyTransport.MapSocketToAddress(endpoint, "akka.tcp", "foo"); var parsedEp = (IPEndPoint)DotNettyTransport.AddressToSocketAddress(addr); return(endpoint.Equals(parsedEp).Label("Should be able to parse endpoint to address and back")); }
public Property DotNettyTransport_should_map_valid_IPEndpoints_to_Address_when_using_publicport(IPEndPoint endpoint) { var addr = DotNettyTransport.MapSocketToAddress(endpoint, "akka.tcp", "foo", publicPort: 1234); var parsedEp = (IPEndPoint)DotNettyTransport.AddressToSocketAddress(addr); var expectedEndpoint = new IPEndPoint(endpoint.Address, 1234); return(expectedEndpoint.Equals(parsedEp).Label("Should be able to parse endpoint with publicport")); }
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 = DotNettyTransport.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()}")); }