* All default values removed from code and loaded from akka-actor-reference.conf, located in src/main/resources (included in jar) * Default test configuration included in AkkaSpec instead of using akka.test.conf, avoids problems when running test (in IDE) and forgetting to use -Dakka.mode=test. * System.properties used first, if availble * Next step will be to split akka-actor-reference.conf in separate -reference for each module
This commit is contained in:
parent
80d766b07b
commit
4b8f11ea92
137 changed files with 8689 additions and 1411 deletions
|
|
@ -3,29 +3,30 @@ package akka.actor;
|
|||
import akka.actor.ActorSystem;
|
||||
import akka.japi.Creator;
|
||||
import org.junit.Test;
|
||||
import akka.actor.Actors;
|
||||
import akka.remote.RemoteSupport;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class JavaAPI {
|
||||
|
||||
private ActorSystem system = ActorSystem.create();
|
||||
|
||||
@Test void mustBeAbleToCreateActorRefFromClass() {
|
||||
ActorRef ref = system.actorOf(JavaAPITestActor.class);
|
||||
assertNotNull(ref);
|
||||
@Test
|
||||
void mustBeAbleToCreateActorRefFromClass() {
|
||||
ActorRef ref = system.actorOf(JavaAPITestActor.class);
|
||||
assertNotNull(ref);
|
||||
}
|
||||
|
||||
@Test void mustBeAbleToCreateActorRefFromFactory() {
|
||||
ActorRef ref = system.actorOf(new Props().withCreator(new Creator<Actor>() {
|
||||
public Actor create() {
|
||||
return new JavaAPITestActor();
|
||||
}
|
||||
}));
|
||||
assertNotNull(ref);
|
||||
@Test
|
||||
void mustBeAbleToCreateActorRefFromFactory() {
|
||||
ActorRef ref = system.actorOf(new Props().withCreator(new Creator<Actor>() {
|
||||
public Actor create() {
|
||||
return new JavaAPITestActor();
|
||||
}
|
||||
}));
|
||||
assertNotNull(ref);
|
||||
}
|
||||
|
||||
@Test void mustAcceptSingleArgTell() {
|
||||
@Test
|
||||
void mustAcceptSingleArgTell() {
|
||||
ActorRef ref = system.actorOf(JavaAPITestActor.class);
|
||||
ref.tell("hallo");
|
||||
ref.tell("hallo", ref);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue