Example #1
0
        public void Props_must_create_actor_by_producer()
        {
            TestLatch latchProducer = new TestLatch();
            TestLatch latchActor    = new TestLatch();
            var       props         = Props.CreateBy <TestProducer>(latchProducer, latchActor);
            IActorRef actor         = Sys.ActorOf(props);

            latchActor.Ready(TimeSpan.FromSeconds(1));
        }
Example #2
0
 public void Remoting_must_create_by_IndirectActorProducer()
 {
     try {
         Resolve.SetResolver(new TestResolver());
         var r = Sys.ActorOf(Props.CreateBy <Resolve <Echo2> >(), "echo");
         Assert.Equal("akka.test://remote-sys@localhost:12346/remote/akka.test/RemotingSpec@localhost:12345/user/echo", r.Path.ToString());
     } finally {
         Resolve.SetResolver(null);
     }
 }
Example #3
0
 public void Remoting_must_create_by_IndirectActorProducer_and_ping()
 {
     try {
         Resolve.SetResolver(new TestResolver());
         var r = Sys.ActorOf(Props.CreateBy <Resolve <Echo2> >(), "echo");
         Assert.Equal("akka.test://remote-sys@localhost:12346/remote/akka.test/RemotingSpec@localhost:12345/user/echo", r.Path.ToString());
         r.Tell("ping", TestActor);
         ExpectMsg(Tuple.Create("pong", TestActor), TimeSpan.FromSeconds(1.5));
     } finally {
         Resolve.SetResolver(null);
     }
 }