Removing ActorRegistry object, UntypedActor object, introducing akka.actor.Actors for the Java API

This commit is contained in:
Viktor Klang 2011-01-04 13:24:28 +01:00
parent accbfd0192
commit e17b4f4f52
38 changed files with 320 additions and 331 deletions

View file

@ -0,0 +1,34 @@
package akka.actor;
import akka.japi.Creator;
import org.junit.Test;
import akka.actor.Actors;
import akka.remoteinterface.RemoteSupport;
import static org.junit.Assert.*;
public class JavaAPI {
@Test void mustBeAbleToUseUntypedActor() {
final RemoteSupport remote = Actors.remote();
assertNotNull(remote);
}
@Test void mustInteractWithActorRegistry() {
final ActorRegistry registry = Actors.registry();
assertNotNull(registry);
}
@Test void mustBeAbleToCreateActorRefFromClass() {
ActorRef ref = Actors.actorOf(JavaAPITestActor.class);
assertNotNull(ref);
}
@Test void mustBeAbleToCreateActorRefFromFactory() {
ActorRef ref = Actors.actorOf(new Creator<Actor>() {
public Actor create() {
return new JavaAPITestActor();
}
});
assertNotNull(ref);
}
}