Merge pull request #286 from jboner/wip-1758-fix-testactorref-√

Moving the InternalGetActor message to the companion object and verifyin...
This commit is contained in:
viktorklang 2012-01-31 15:01:26 -08:00
commit e7cfb83288
2 changed files with 22 additions and 1 deletions

View file

@ -34,7 +34,7 @@ class TestActorRef[T <: Actor](
_supervisor.path / name,
false) {
private case object InternalGetActor extends AutoReceivedMessage
import TestActorRef.InternalGetActor
override def newActorCell(
system: ActorSystemImpl,
@ -98,6 +98,8 @@ class TestActorRef[T <: Actor](
object TestActorRef {
private case object InternalGetActor extends AutoReceivedMessage
private val number = new AtomicLong
private[testkit] def randomName: String = {
val l = number.getAndIncrement()

View file

@ -0,0 +1,19 @@
/**
* Copyright (C) 2009-2012 Typesafe Inc. <http://www.typesafe.com>
*/
package akka.testkit;
import org.junit.Test;
import akka.actor.Props;
import static org.junit.Assert.*;
public class TestActorRefJavaSpec {
@Test
public void shouldBeAbleToUseApply() {
//Just a dummy call to make sure it compiles
TestActorRef ref = TestActorRef.apply(new Props(), null);
}
}