add JavaTestKit, see #1952

- it’s a completely new-written thing in pure Java, so that “protected”
  modifiers actually work and no ghost errors appear wrt. inheriting
  from PartialFunction or similar
- it also features integration with the EventFilter
- all closure-based constructs are modeled as inner classes of the
  JavaTestKit, where the user needs to override a single method which
  will then be executed
This commit is contained in:
Roland 2012-06-29 14:42:11 +02:00
parent be74eb835b
commit d7bed79730
15 changed files with 964 additions and 365 deletions

View file

@ -44,10 +44,10 @@ class TestProbeSpec extends AkkaSpec with DefaultTimeout {
//#autopilot
val probe = TestProbe()
probe.setAutoPilot(new TestActor.AutoPilot {
def run(sender: ActorRef, msg: Any): Option[TestActor.AutoPilot] =
def run(sender: ActorRef, msg: Any): TestActor.AutoPilot =
msg match {
case "stop" None
case x testActor.tell(x, sender); Some(this)
case "stop" TestActor.NoAutoPilot
case x testActor.tell(x, sender); TestActor.KeepRunning
}
})
//#autopilot