make akka-actor-tests compile again
This commit is contained in:
parent
1e1409e796
commit
93b1ef3703
67 changed files with 1576 additions and 1813 deletions
|
|
@ -1,5 +1,6 @@
|
|||
package akka.actor;
|
||||
|
||||
import akka.AkkaApplication;
|
||||
import akka.japi.Creator;
|
||||
import org.junit.Test;
|
||||
import akka.actor.Actors;
|
||||
|
|
@ -8,32 +9,34 @@ import static org.junit.Assert.*;
|
|||
|
||||
public class JavaAPI {
|
||||
|
||||
private AkkaApplication app = new AkkaApplication();
|
||||
|
||||
@Test void mustBeAbleToUseUntypedActor() {
|
||||
final RemoteSupport remote = Actors.remote();
|
||||
final RemoteSupport remote = app.remote();
|
||||
assertNotNull(remote);
|
||||
}
|
||||
|
||||
@Test void mustInteractWithActorRegistry() {
|
||||
final ActorRegistry registry = Actors.registry();
|
||||
final ActorRegistry registry = app.registry();
|
||||
assertNotNull(registry);
|
||||
}
|
||||
|
||||
@Test void mustBeAbleToCreateActorRefFromClass() {
|
||||
ActorRef ref = Actors.actorOf(JavaAPITestActor.class);
|
||||
ActorRef ref = app.createActor(JavaAPITestActor.class);
|
||||
assertNotNull(ref);
|
||||
}
|
||||
|
||||
@Test void mustBeAbleToCreateActorRefFromFactory() {
|
||||
ActorRef ref = Actors.actorOf(new Creator<Actor>() {
|
||||
ActorRef ref = app.createActor(new Props().withCreator(new Creator<Actor>() {
|
||||
public Actor create() {
|
||||
return new JavaAPITestActor();
|
||||
}
|
||||
});
|
||||
}));
|
||||
assertNotNull(ref);
|
||||
}
|
||||
|
||||
@Test void mustAcceptSingleArgTryTell() {
|
||||
ActorRef ref = Actors.actorOf(JavaAPITestActor.class);
|
||||
ActorRef ref = app.createActor(JavaAPITestActor.class);
|
||||
ref.tryTell("hallo");
|
||||
ref.tryTell("hallo", ref);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue