public void RemoteActorRefProvider_should_create_RemoteActorRef_for_nonlocaladdress()
 {
     var nonLocalAddress = new Address("akka.trttl.gremlin.tcp", Sys.Name, "localhost", RARP.For(Sys).Provider.DefaultAddress.Port);
     var nonLocalActorPath = new RootActorPath(nonLocalAddress) / "user" / "foo";
     var resolved = RARP.For(Sys).Provider.ResolveActorRefWithLocalAddress(nonLocalActorPath.ToSerializationFormat(), nonLocalAddress);
     Assert.IsType<RemoteActorRef>(resolved); // should be a remote actorref
 }
        public Property ActorPath_Should_parse_from_any_valid_EndPoint(EndPoint ep)
        {
            var addr                = EndpointGenerators.ParseAddress(ep);
            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()}"));
        }
        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()}"));
        }
Exemplo n.º 4
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                = 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()}"));
        }
Exemplo n.º 5
0
 public Property ActorPath_Should_parse_from_any_valid_EndPoint(EndPoint ep)
 {
     var addr = EndpointGenerators.ParseAddress(ep);
     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()}");
 }
 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()}");
 }
        public void RemoteActorRefProvider_should_create_RemoteActorRef_for_nonlocaladdress()
        {
            var nonLocalAddress   = new Address("akka.trttl.gremlin.tcp", Sys.Name, "localhost", RARP.For(Sys).Provider.DefaultAddress.Port);
            var nonLocalActorPath = new RootActorPath(nonLocalAddress) / "user" / "foo";
            var resolved          = RARP.For(Sys).Provider.ResolveActorRefWithLocalAddress(nonLocalActorPath.ToSerializationFormat(), nonLocalAddress);

            Assert.IsType <RemoteActorRef>(resolved); // should be a remote actorref
        }