2012-02-27 22:38:26 +01:00
|
|
|
package akka.actor;
|
|
|
|
|
|
|
|
|
|
import org.junit.AfterClass;
|
|
|
|
|
import org.junit.BeforeClass;
|
|
|
|
|
import org.junit.Test;
|
2012-09-19 23:55:53 +02:00
|
|
|
|
|
|
|
|
import com.typesafe.config.ConfigFactory;
|
2012-02-27 22:38:26 +01:00
|
|
|
|
|
|
|
|
public class StashJavaAPI {
|
|
|
|
|
|
2012-09-19 23:55:53 +02:00
|
|
|
private static ActorSystem system;
|
|
|
|
|
|
|
|
|
|
@BeforeClass
|
|
|
|
|
public static void beforeAll() {
|
|
|
|
|
system = ActorSystem.create("StashJavaAPI",
|
|
|
|
|
ConfigFactory.parseString(ActorWithStashSpec.testConf()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@AfterClass
|
|
|
|
|
public static void afterAll() {
|
|
|
|
|
system.shutdown();
|
|
|
|
|
system = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void mustBeAbleToUseStash() {
|
2013-05-02 17:00:44 +02:00
|
|
|
ActorRef ref = system.actorOf(Props.create(StashJavaAPITestActor.class)
|
2012-09-19 23:55:53 +02:00
|
|
|
.withDispatcher("my-dispatcher"));
|
|
|
|
|
ref.tell("Hello", ref);
|
|
|
|
|
ref.tell("Hello", ref);
|
|
|
|
|
ref.tell(new Object(), null);
|
|
|
|
|
}
|
2012-02-27 22:38:26 +01:00
|
|
|
|
|
|
|
|
}
|