fix StashJavaAPI test (i.e. make it test something)

This commit is contained in:
Roland 2013-05-22 11:49:30 +02:00
parent 52db4a32fd
commit 479c5170cd

View file

@ -1,6 +1,8 @@
package akka.actor; package akka.actor;
import akka.testkit.AkkaJUnitActorSystemResource; import akka.testkit.AkkaJUnitActorSystemResource;
import akka.testkit.TestProbe;
import org.junit.ClassRule; import org.junit.ClassRule;
import org.junit.Test; import org.junit.Test;
@ -16,11 +18,12 @@ public class StashJavaAPI {
@Test @Test
public void mustBeAbleToUseStash() { public void mustBeAbleToUseStash() {
ActorRef ref = system.actorOf(Props.create(StashJavaAPITestActor.class) ActorRef ref = system.actorOf(Props.create(StashJavaAPITestActor.class));
.withDispatcher("my-dispatcher")); final TestProbe probe = new TestProbe(system);
ref.tell("Hello", ref); probe.send(ref, "Hello");
ref.tell("Hello", ref); probe.send(ref, "Hello2");
ref.tell(new Object(), null); probe.send(ref, "Hello12");
probe.expectMsg(5);
} }
} }