Adding create() to ReceiveBuilder to promote a builder-like syntax #18894
This commit is contained in:
parent
679db55eca
commit
7eb4afc475
4 changed files with 67 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue