@Test public void testJoinRunning() throws Exception { new JavaTestKit(system) { { final Props props = LobbyBalancerActor.props(configuration); final ActorRef subject = system.actorOf(props); final Join req = new Join(team, getRef()); watch(subject); subject.tell(req, getRef()); expectMsgClass(duration("1 second"), JoinSuccess.class); } }; }
public static Props props(LobbyConfiguration configuration, int min, int max) { return Props.create(LobbyBalancerActor.class, () -> new LobbyBalancerActor(configuration, min, max)); }
LobbyBalancerActor extends AbstractActor { public static Props props(LobbyConfiguration configuration, int min, int max) { return Props.create(LobbyBalancerActor.class, () -> new LobbyBalancerActor(configuration, min, max)); } }
LobbyBalancerActor extends AbstractActor { public static Props props(LobbyConfiguration configuration, int min, int max) { return Props.create(LobbyBalancerActor.class, () -> new LobbyBalancerActor(configuration, min, max)); } private  LobbyBalancerActor(LobbyConfiguration configuration, int min, int max); }
LobbyBalancerActor extends AbstractActor { public static Props props(LobbyConfiguration configuration, int min, int max) { return Props.create(LobbyBalancerActor.class, () -> new LobbyBalancerActor(configuration, min, max)); } private  LobbyBalancerActor(LobbyConfiguration configuration, int min, int max); @Override void preStart(); @Override PartialFunction<Object, BoxedUnit> receive(); static Props props(LobbyConfiguration configuration, int min, int max); static Props props(LobbyConfiguration configuration); }
LobbyBalancerActor extends AbstractActor { public static Props props(LobbyConfiguration configuration, int min, int max) { return Props.create(LobbyBalancerActor.class, () -> new LobbyBalancerActor(configuration, min, max)); } private  LobbyBalancerActor(LobbyConfiguration configuration, int min, int max); @Override void preStart(); @Override PartialFunction<Object, BoxedUnit> receive(); static Props props(LobbyConfiguration configuration, int min, int max); static Props props(LobbyConfiguration configuration);  }