Skip to content

Commit

Permalink
Merge pull request #286 from jboner/wip-1758-fix-testactorref-√
Browse files Browse the repository at this point in the history
Moving the InternalGetActor message to the companion object and verifyin...
  • Loading branch information
viktorklang committed Jan 31, 2012
2 parents b4d9486 + dcebd1d commit e7cfb83
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
4 changes: 3 additions & 1 deletion akka-testkit/src/main/scala/akka/testkit/TestActorRef.scala
Expand Up @@ -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,
Expand Down Expand Up @@ -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()
Expand Down
19 changes: 19 additions & 0 deletions akka-testkit/src/test/java/akka/testkit/TestActorRefJavaSpec.java
@@ -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);
}
}

0 comments on commit e7cfb83

Please sign in to comment.