3031323334353637383940
public class StatefulActorTest { @Test public void testStatefulActor() throws Exception { final Actor actor = new MyActor(); actor.start(); actor.send("Hello"); actor.send("Hello again"); actor.send(10); actor.send("Bye"); actor.send("Bye again");
3132333435363738394041
@Test public void testStatefulActor() throws Exception { final Actor actor = new MyActor(); actor.start(); actor.send("Hello"); actor.send("Hello again"); actor.send(10); actor.send("Bye"); actor.send("Bye again"); actor.send(10);
3233343536373839404142
public void testStatefulActor() throws Exception { final Actor actor = new MyActor(); actor.start(); actor.send("Hello"); actor.send("Hello again"); actor.send(10); actor.send("Bye"); actor.send("Bye again"); actor.send(10);
3435363738394041424344
actor.start(); actor.send("Hello"); actor.send("Hello again"); actor.send(10); actor.send("Bye"); actor.send("Bye again"); actor.send(10); Thread.sleep(2000L);
3536373839404142434445
actor.send("Hello"); actor.send("Hello again"); actor.send(10); actor.send("Bye"); actor.send("Bye again"); actor.send(10); Thread.sleep(2000L); }
3637383940414243444546
actor.send("Hello again"); actor.send(10); actor.send("Bye"); actor.send("Bye again"); actor.send(10); Thread.sleep(2000L); }