fix StashJavaAPI test (i.e. make it test something)
This commit is contained in:
parent
52db4a32fd
commit
479c5170cd
1 changed files with 8 additions and 5 deletions
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue