Adding create() to ReceiveBuilder to promote a builder-like syntax #18894

This commit is contained in:
Wojciech Grajewski 2016-10-23 22:35:18 +02:00
parent 679db55eca
commit 7eb4afc475
4 changed files with 67 additions and 0 deletions

View file

@ -365,6 +365,22 @@ public class ActorDocTest extends AbstractJavaTest {
}
}
@Test
public void creatingGraduallyBuiltActorWithSystemActorOf() {
final ActorSystem system = ActorSystem.create("MySystem", config);
final ActorRef actor = system.actorOf(Props.create(GraduallyBuiltActor.class), "graduallyBuiltActor");
try {
new JavaTestKit(system) {
{
actor.tell("hello", getRef());
expectMsgEquals("hello");
}
};
} finally {
JavaTestKit.shutdownActorSystem(system);
}
}
@Test
public void creatingPropsConfig() {
//#creating-props